/*!common/widgets/policy-update/main.js*/
;define('common/widgets/policy-update/main', ['require', 'exports', 'module', "common/components/modal/modal", 'dep/jquery.cookie/jquery.cookie'], function(require, exports, module) {

  require("common/components/modal/modal");
  require('dep/jquery.cookie/jquery.cookie');
  
  var host = "https://gate.lagou.com";
  
  var COOKIE_NAME = "privacyPolicyPopup";
  
  
  
  function setCookie(val) {
      $.cookie(COOKIE_NAME, val, { domain: ".lagou.com", expires: 7 }); 
  }
  
  
  function showPopUp()  {
      $(".policy-update").modal("show");
  }
  
  function isShowPopUp(showCb, notShowCb) {
      $.lgAjax({
          type: 'get',
          headers: {
              'X-L-REQ-HEADER': '{deviceType: 1}'
          },
          xhrFields: {
              withCredentials: true
          },
          url: host + '/v1/entry/privacyPolicy/query',
          dataType: 'json',
          needNoToken: true
      }).done(function (result) {
          if (result.state != 1) {
              return;
          }
          if (result.content.popUp) {
              showCb && showCb();
          } else {
              notShowCb && notShowCb();
          }
      })
  }
  
  function initPop() {
      if (window.location.href.indexOf("privacy.html") > -1 || window.location.href.indexOf("policy.html") > -1 ) {
          return;
      }
  
  
      if (typeof $.cookie(COOKIE_NAME) === "undefined" || $.trim($.cookie(COOKIE_NAME)) === "") {
          isShowPopUp(function() {
              // 展示弹窗
              setCookie(true); 
              showPopUp();
          }, function() {
              // 不展示弹窗
              setCookie(false); 
          });
      } else if ($.cookie(COOKIE_NAME) === "true") {
          showPopUp();
      }
  
      $(".policy-update .comfirm-btn").bind("click", function() {
          $.lgAjax({
              type: 'post',
              headers: {
                  'X-L-REQ-HEADER': '{deviceType: 1}'
              },
              xhrFields: {
                  withCredentials: true
              },
              url: host + '/v1/entry/privacyPolicy/userConfirm',
              dataType: 'json',
              needNoToken: true
          }).done(function (result) {
              setCookie(false); 
              $(".policy-update").modal("hide");
          }).fail(function() {
              setCookie(false); 
              $(".policy-update").modal("hide");
          })
          
      });
  }
  
  initPop();
  
  

});
/*!community/modules/common/main.js*/
;/**
 * 问答社区-公用脚本
 *
 * @author fridayhu@lagou.com
 *
 * jquery-colorbox
 * @require "common/components/jquery-colorbox-custom/jquery-colorbox.css"
 *
 */

define('community/modules/common/main', ['require', 'exports', 'module', 'common/widgets/passport/passport', 'dep/jquery-colorbox/jquery.colorbox'], function(require, exports, module) {

	require('common/widgets/passport/passport');
	require('dep/jquery-colorbox/jquery.colorbox');

	var config = {
		// 公共接口
		url: {
			// 获取推荐话题
			getRecommendedTopic: GLOBAL_DOMAIN.zctx + '/topic/topicRecommondList.json',
			// 获取推荐问题
			getRecommendedQuestion: GLOBAL_DOMAIN.zctx + '/question/questionRecommondList.json',
			// 关注话题
			followTopic: GLOBAL_DOMAIN.zctx + '/attention/attentionTopic.json',
			// 取消关注话题
			cancelFollwTopic: GLOBAL_DOMAIN.zctx + '/attention/cancelAttentionTopic.json',
			// 关注问题
			followQuestion: GLOBAL_DOMAIN.zctx + '/attention/attentionQuestion.json',
			// 取消关注问题
			cancelFollowQuestion: GLOBAL_DOMAIN.zctx + '/attention/cancelAttentionQuestion.json',
			// 点赞回答
			supportAnswer: GLOBAL_DOMAIN.zctx + '/star/starAnswer.json',
			// 取消点赞回答
			cancelSupportAnswer: GLOBAL_DOMAIN.zctx + '/star/cancelStarAnswer.json',
			// 上传用户头像
			uploadAndcutPic: GLOBAL_DOMAIN.zctx + '/user/uploadAndcutPic.json',
			// 用户名校验
			validateUserName: GLOBAL_DOMAIN.zctx + '/user/validateUserName.json',
			// 保存、修改用户信息
			saveUserinfo: GLOBAL_DOMAIN.zctx + '/user/saveInfo.json',
			// 上传回答图片
			uploadAnswerPic: GLOBAL_DOMAIN.zctx + '/answer/uploadAnswerPic.json',
			// 保存答案
			saveAnswer: GLOBAL_DOMAIN.zctx + '/answer/saveAnswer.json',
			// 编辑答案
			editAnswer: GLOBAL_DOMAIN.zctx + '/answer/editAnswer.json',
			// 获取向谁提问列表
			getAskToList: GLOBAL_DOMAIN.zctx + '/question/getAskToList.json',
			// 搜索话题
			searchTopic: GLOBAL_DOMAIN.zctx + '/topic/searchTopic.json',
			// 添加话题
			saveTopic: GLOBAL_DOMAIN.zctx + '/topic/saveTopic.json',
			// 提问
			addQuestion: GLOBAL_DOMAIN.zctx + '/question/addQuestion.json',
			// 关注用户
			followUser: GLOBAL_DOMAIN.zctx + '/attention/followUser.json',
			// 取消关注用户
			cancelFollowUser: GLOBAL_DOMAIN.zctx + '/attention/cancelfollowUser.json',
			// 获赞Rank
			getStarRank: GLOBAL_DOMAIN.zctx + '/star/queryGainStarRanking.json',
			// 获取点赞列表
			getStarUserList: GLOBAL_DOMAIN.zctx + '/star/starUserList.json',
			// 搜索问题
			searchQuestion: GLOBAL_DOMAIN.zctx + '/question/searchQuestionJson.json'
		},
		// 首页接口
		indexURL: {
			// 加载更多
			getMoreNews: GLOBAL_DOMAIN.zctx + '/indexMoreNewsList.json',
			// 左侧推荐话题（暂时同公共获取推荐话题接口）
			getRecommendedTopic: GLOBAL_DOMAIN.zctx + '/topic/topicRecommondList.json'
		},
		// 话题列表页接口
		topicListURL: {
			// 加载更多
			getMoreTopics: GLOBAL_DOMAIN.zctx + '/topic/getTopicList.json'
		},
		// 话题详情页接口
		topicDetailURL: {
			// 加载更多
			getMoreTopicNews: GLOBAL_DOMAIN.zctx + '/topic/moreTopicNewsList.json'
		},
		// 起始页（完善个人信息）
		publisherUrl: {
			// 用户名校验
			validate: GLOBAL_DOMAIN.zctx + '/user/validateUserName.json'
		},
		// 起始页（选择关注话题）
		selectTopicUrl: {
			// 换一换
			changeTopicList: GLOBAL_DOMAIN.zctx + '/user/changeTopicList.json',
			// 保存起始关注话题列表
			saveAttentionTopicList: GLOBAL_DOMAIN.zctx + '/user/saveAttentionTopicList.json'
		},
		// 问题页接口
		questionPageUrl: {
			// 加载更多回答
			getAnswerList: GLOBAL_DOMAIN.zctx + '/question/getAnswerList.json',
			// 邀请回答
			inviteAnswer: GLOBAL_DOMAIN.zctx + '/invitation/sendInvite.json',
			// 保存草稿
			saveAnswerDraft: GLOBAL_DOMAIN.zctx + '/answer/saveAnswerDraft.json'
		},
		// 回答页接口
		answerPageUrl: {
			// 加载更多评论
			getCommentList: GLOBAL_DOMAIN.zctx + '/comment/getComment.json',
			// 添加评论
			addComment: GLOBAL_DOMAIN.zctx + '/comment/addComment.json',
			// 回复评论
			replyComment: GLOBAL_DOMAIN.zctx + '/comment/replyComment.json',
			// 删除评论
			deleteComment: GLOBAL_DOMAIN.zctx + '/comment/deleteComment.json',
			// 删除答案
			deleteAnswer: GLOBAL_DOMAIN.zctx + '/answer/delAnswer.json'
		},
		personalPageUrl: {
			// 加载更多
			moreUserNewsList: GLOBAL_DOMAIN.zctx + '/user/moreUserNewsList.json',
			// 获取用户的粉丝列表
			getFollowersList: GLOBAL_DOMAIN.zctx + '/attention/getFollowersList.json',
			// 获取用户的关注列表
			getFollowingList: GLOBAL_DOMAIN.zctx + '/attention/getFolloweesList.json'
		}
	};

	exports.config = config;

	var helper = {
		/**
		 * [ajax 异步请求辅助方法]
		 * @param  {[Object]} option [ajax配置]
		 * option.url {[String]} [请求地址]
		 * option.type {[String]} [请求方式，默认GET]
		 * option.params {[Object]} [请求参数]
		 */
		ajax: function(option) {

			if (!option.url) {
				return;
			}

			var config;
			// 分析url是否跨域
			if (analyzeUri(option.url)) {
				config = {
					url: option.url,
					dataType: 'jsonp',
					jsonp: 'jsoncallback',
					data: option.data || {}
				};
			} else {
				config = {
					url: option.url,
					type: option.type || 'GET',
					dataType: 'json',
					data: option.data || {}
				};
			}

			return $.lgAjax(config);

		},
		/**
		 * [supportAnswer 点赞回答]
		 * @param  {[Number]} id      [回答id]
		 * @param  {[Object]} handler [回调]
		 * handler.done {[Function]} [点赞成功回调]
		 * handler.fail {[Function]} [点赞失败回调]
		 * handler.always {[Function]} [ajax请求执行完成回调]
		 */
		supportAnswer: function(id, handler) {
			if (!helper.checkUserStatus({
					checkAuthority: false
				})) {
				handler && handler.fail && handler.fail();
				handler && handler.always && handler.always();
				return;
			}
			helper.ajax({
				url: config.url.supportAnswer,
				data: {
					answerId: id
				}
			}).done(function(data) {
				if (data.state == 1) {
					handler && handler.done && handler.done(data);
				} else if (data.state == 304) {
					PASSPORT.loginPopup();
					handler && handler.fail && handler.fail();
				} else if (data.state == 201) {
					helper.alertTips('参数错误');
					handler && handler.fail && handler.fail();
				} else if (data.state == 202) {
					helper.alertTips('不好意思，服务器开了个小差，点赞失败！');
					handler && handler.fail && handler.fail();
				} else if (data.state == 203) {
					helper.alertTips('你点赞的答案已经不存在了！');
					handler && handler.fail && handler.fail();
				} else if (data.state == 204) {
					helper.alertTips('你已经点过赞了');
					handler && handler.fail && handler.fail();
				} else if (data.state == 205) {
					helper.alertTips('你不需要给自己的答案点赞');
					handler && handler.fail && handler.fail();
				} else if (data.state == 10000) {
					helper.alertTips('没有权限');
					handler && handler.fail && handler.fail();
				} else {
					console.log(data.message);
					handler && handler.fail && handler.fail();
				}
			}).fail(function() {
				console.log('supportAnswer error');
				handler && handler.fail && handler.fail();
			}).always(function() {
				handler && handler.always && handler.always();
			});
		},
		/**
		 * [cancelSupportAnswer 取消点赞回答]
		 * @param  {[Number]} id      [回答id]
		 * @param  {[Object]} handler [回调]
		 * handler.done {[Function]} [取消成功回调]
		 * handler.fail {[Function]} [取消失败回调]
		 * handler.always {[Function]} [ajax请求执行完成回调]
		 */
		cancelSupportAnswer: function(id, handler) {
			if (!helper.checkUserStatus({
					checkAuthority: false
				})) {
				handler && handler.fail && handler.fail();
				handler && handler.always && handler.always();
				return;
			}
			helper.ajax({
				url: config.url.cancelSupportAnswer,
				data: {
					answerId: id
				}
			}).done(function(data) {
				if (data.state == 1) {
					handler && handler.done && handler.done(data);
				} else if (data.state == 304) {
					PASSPORT.loginPopup();
					handler && handler.fail && handler.fail();
				} else if (data.state == 201) {
					helper.alertTips('参数错误');
					handler && handler.fail && handler.fail();
				} else if (data.state == 202) {
					helper.alertTips('不好意思，服务器开了个小差，点赞取消失败！');
					handler && handler.fail && handler.fail();
				} else if (data.state == 203) {
					helper.alertTips('你取消点赞的答案已经不存在了！');
					handler && handler.fail && handler.fail();
				} else if (data.state == 204) {
					helper.alertTips('你已经取消点赞了');
					handler && handler.fail && handler.fail();
				} else if (data.state == 10000) {
					helper.alertTips('没有权限');
					handler && handler.fail && handler.fail();
				} else {
					console.log(data.message);
					handler && handler.fail && handler.fail();
				}
			}).fail(function() {
				console.log('cancelSupportAnswer error');
				handler && handler.fail && handler.fail();
			}).always(function() {
				handler && handler.always && handler.always();
			});
		},
		/**
		 * [followTopic 关注话题]
		 * @param  {[Number]} id [话题id]
		 * @params  {[Object]} handler [回调]
		 * handler.done {[Function]} [关注成功回调]
		 * handler.fail {[Function]} [关注失败回调]
		 * handler.always {[Function]} [ajax请求执行完成回调]
		 */
		followTopic: function(id, handler) {
			if (!helper.checkUserStatus({
					checkAuthority: false
				})) {
				handler && handler.fail && handler.fail();
				handler && handler.always && handler.always();
				return;
			}
			helper.ajax({
				url: config.url.followTopic,
				data: {
					topicId: id
				}
			}).done(function(data) {
				if (data.state == 1) {
					handler && handler.done && handler.done(data);
				} else if (data.state == 304) {
					PASSPORT.loginPopup();
					handler && handler.fail && handler.fail();
				} else if (data.state == 201) {
					helper.alertTips('参数错误');
					handler && handler.fail && handler.fail();
				} else if (data.state == 202) {
					helper.alertTips('不好意思，服务器开了个小差，关注失败！');
					handler && handler.fail && handler.fail();
				} else if (data.state == 203) {
					helper.alertTips('你关注的话题已经不存在了！');
					handler && handler.fail && handler.fail();
				} else if (data.state == 204) {
					helper.alertTips('你已经关注过该话题');
					handler && handler.fail && handler.fail();
				} else if (data.state == 10000) {
					helper.alertTips('没有权限');
					handler && handler.fail && handler.fail();
				} else {
					console.log(data.message);
					handler && handler.fail && handler.fail();
				}
			}).fail(function() {
				console.log('followTopic error');
				handler && handler.fail && handler.fail();
			}).always(function() {
				handler && handler.always && handler.always();
			});
		},
		/**
		 * [cancelFollwTopic 取消关注话题]
		 * @param  {[Number]} id [话题id]
		 * @params  {[Object]} handler [回调]
		 * handler.done {[Function]} [取消成功回调]
		 * handler.fail {[Function]} [取消失败回调]
		 * handler.always {[Function]} [ajax请求执行完成回调]
		 */
		cancelFollwTopic: function(id, handler) {
			if (!helper.checkUserStatus({
					checkAuthority: false
				})) {
				handler && handler.fail && handler.fail();
				handler && handler.always && handler.always();
				return;
			}
			helper.ajax({
				url: config.url.cancelFollwTopic,
				data: {
					topicId: id
				}
			}).done(function(data) {
				if (data.state == 1) {
					handler && handler.done && handler.done(data);
				} else if (data.state == 304) {
					PASSPORT.loginPopup();
					handler && handler.fail && handler.fail();
				} else if (data.state == 201) {
					helper.alertTips('参数错误');
					handler && handler.fail && handler.fail();
				} else if (data.state == 202) {
					helper.alertTips('不好意思，服务器开了个小差，取消关注话题失败！');
					handler && handler.fail && handler.fail();
				} else if (data.state == 203) {
					helper.alertTips('你取消关注的话题已经不存在了！');
					handler && handler.fail && handler.fail();
				} else if (data.state == 204) {
					helper.alertTips('你已经取消关注过该话题');
					handler && handler.fail && handler.fail();
				} else if (data.state == 10000) {
					helper.alertTips('没有权限');
					handler && handler.fail && handler.fail();
				} else {
					console.log(data.message);
					handler && handler.fail && handler.fail();
				}
			}).fail(function() {
				console.log('cancelFollwTopic error');
				handler && handler.fail && handler.fail();
			}).always(function() {
				handler && handler.always && handler.always();
			});
		},
		/**
		 * [followQuestion 关注问题]
		 * @param  {[Number]} id [问题id]
		 * @params  {[Object]} handler [回调]
		 * handler.done {[Function]} [关注成功回调]
		 * handler.fail {[Function]} [关注失败回调]
		 * handler.always {[Function]} [ajax请求执行完成回调]
		 */
		followQuestion: function(id, handler) {
			if (!helper.checkUserStatus({
					checkAuthority: false
				})) {
				handler && handler.fail && handler.fail();
				handler && handler.always && handler.always();
				return;
			}
			helper.ajax({
				url: config.url.followQuestion,
				data: {
					questionId: id
				}
			}).done(function(data) {
				if (data.state == 1) {
					handler && handler.done && handler.done(data);
				} else if (data.state == 304) {
					PASSPORT.loginPopup();
					handler && handler.fail && handler.fail();
				} else if (data.state == 201) {
					helper.alertTips('参数错误');
					handler && handler.fail && handler.fail();
				} else if (data.state == 202) {
					helper.alertTips('不好意思，服务器开了个小差，关注失败！');
					handler && handler.fail && handler.fail();
				} else if (data.state == 203) {
					helper.alertTips('你关注的问题已经不存在了！');
					handler && handler.fail && handler.fail();
				} else if (data.state == 204) {
					helper.alertTips('你已经关注过该问题');
					handler && handler.fail && handler.fail();
				} else if (data.state == 10000) {
					helper.alertTips('没有权限');
					handler && handler.fail && handler.fail();
				} else {
					console.log(data.message);
					handler && handler.fail && handler.fail();
				}
			}).fail(function() {
				console.log('followQuestion error');
				handler && handler.fail && handler.fail();
			}).always(function() {
				handler && handler.always && handler.always();
			});
		},
		/**
		 * [cancelFollwQuestion 取消关注问题]
		 * @param  {[Number]} id [问题id]
		 * @params  {[Object]} handler [回调]
		 * handler.done {[Function]} [取消成功回调]
		 * handler.fail {[Function]} [取消失败回调]
		 * handler.always {[Function]} [ajax请求执行完成回调]
		 */
		cancelFollwQuestion: function(id, handler) {
			if (!helper.checkUserStatus({
					checkAuthority: false
				})) {
				handler && handler.fail && handler.fail();
				handler && handler.always && handler.always();
				return;
			}
			helper.ajax({
				url: config.url.cancelFollowQuestion,
				data: {
					questionId: id
				}
			}).done(function(data) {
				if (data.state == 1) {
					handler && handler.done && handler.done(data);
				} else if (data.state == 304) {
					PASSPORT.loginPopup();
					handler && handler.fail && handler.fail();
				} else if (data.state == 201) {
					helper.alertTips('参数错误');
					handler && handler.fail && handler.fail();
				} else if (data.state == 202) {
					helper.alertTips('不好意思，服务器开了个小差，取消关注问题失败！');
					handler && handler.fail && handler.fail();
				} else if (data.state == 203) {
					helper.alertTips('你取消关注的问题已经不存在了！');
					handler && handler.fail && handler.fail();
				} else if (data.state == 204) {
					helper.alertTips('你已经取消关注过该问题');
					handler && handler.fail && handler.fail();
				} else if (data.state == 10000) {
					helper.alertTips('没有权限');
					handler && handler.fail && handler.fail();
				} else {
					console.log(data.message);
					handler && handler.fail && handler.fail();
				}
			}).fail(function() {
				console.log('cancelFollwQuestion error');
				handler && handler.fail && handler.fail();
			}).always(function() {
				handler && handler.always && handler.always();
			});
		},
		/**
		 * [followUser 关注用户]
		 * @param  {[Number]} id [用户id]
		 * @params  {[Object]} handler [回调]
		 * handler.done {[Function]} [关注成功回调]
		 * handler.fail {[Function]} [关注失败回调]
		 * handler.always {[Function]} [ajax请求执行完成回调]
		 */
		followUser: function(id, handler) {
			if (!helper.checkUserStatus({
					checkAuthority: false
				})) {
				handler && handler.fail && handler.fail();
				handler && handler.always && handler.always();
				return;
			}
			helper.ajax({
				url: config.url.followUser,
				data: {
					targetUserId: id
				}
			}).done(function(data) {
				if (data.state == 1) {
					handler && handler.done && handler.done(data);
				} else if (data.state == 304) {
					PASSPORT.loginPopup();
					handler && handler.fail && handler.fail();
				} else if (data.state == 201) {
					helper.alertTips('参数错误');
					handler && handler.fail && handler.fail();
				} else if (data.state == 202) {
					helper.alertTips('不好意思，服务器开了个小差，关注失败！');
					handler && handler.fail && handler.fail();
				} else if (data.state == 203) {
					helper.alertTips('你关注的用户不存在！');
					handler && handler.fail && handler.fail();
				} else if (data.state == 204) {
					helper.alertTips('你已经关注过该用户');
					handler && handler.fail && handler.fail();
				} else if (data.state == 205) {
					helper.alertTips('你不能关注自己');
					handler && handler.fail && handler.fail();
				} else if (data.state == 10000) {
					helper.alertTips('没有权限');
					handler && handler.fail && handler.fail();
				} else {
					console.log(data.message);
					handler && handler.fail && handler.fail();
				}
			}).fail(function() {
				console.log('followUser error');
				handler && handler.fail && handler.fail();
			}).always(function() {
				handler && handler.always && handler.always();
			});
		},
		/**
		 * [cancelFollowUser 取消关注用户]
		 * @param  {[Number]} id [用户id]
		 * @params  {[Object]} handler [回调]
		 * handler.done {[Function]} [取消成功回调]
		 * handler.fail {[Function]} [取消失败回调]
		 * handler.always {[Function]} [ajax请求执行完成回调]
		 */
		cancelFollowUser: function(id, handler) {
			if (!helper.checkUserStatus({
					checkAuthority: false
				})) {
				handler && handler.fail && handler.fail();
				handler && handler.always && handler.always();
				return;
			}
			helper.ajax({
				url: config.url.cancelFollowUser,
				data: {
					targetUserId: id
				}
			}).done(function(data) {
				if (data.state == 1) {
					handler && handler.done && handler.done(data);
				} else if (data.state == 304) {
					PASSPORT.loginPopup();
					handler && handler.fail && handler.fail();
				} else if (data.state == 201) {
					helper.alertTips('参数错误');
					handler && handler.fail && handler.fail();
				} else if (data.state == 202) {
					helper.alertTips('不好意思，服务器开了个小差，取消关注失败！');
					handler && handler.fail && handler.fail();
				} else if (data.state == 203) {
					helper.alertTips('你取消关注的用户不存在！');
					handler && handler.fail && handler.fail();
				} else if (data.state == 204) {
					helper.alertTips('你已经取消关注过该用户');
					handler && handler.fail && handler.fail();
				} else if (data.state == 10000) {
					helper.alertTips('没有权限');
					handler && handler.fail && handler.fail();
				} else {
					console.log(data.message);
					handler && handler.fail && handler.fail();
				}
			}).fail(function() {
				console.log('cancelFollowUser error');
				handler && handler.fail && handler.fail();
			}).always(function() {
				handler && handler.always && handler.always();
			});
		},
		/**
		 * [addAnswer 回答问题]
		 * @param  {[Object]} data [答案表单数据]
		 * @return  {[Mixed]} undefined或者$.ajax promise
		 */
		addAnswer: function(data) {
			if (Object.prototype.toString.call(data) !== '[object Object]') { // 简单的参数校验
				return;
			}

			return $.lgAjax({
				url: config.url.saveAnswer,
				type: 'POST',
				data: data,
				dataType: 'json'
			}).done(function(data, textStatus, jqXHR) {
				if (parseInt(data.state, 10) === 1) {
					window.location.reload();
				} else if (parseInt(data.state, 10) === 304) {
					PASSPORT.loginPopup();
				} else if (parseInt(data.state, 10) === 208) {
					helper.alertTips('该问题已被管理员关闭！');
				} else if (parseInt(data.state, 10) === 209) {
					helper.alertTips('你已回答该问题！');
				} else if (parseInt(data.state, 10) === 210) {
					helper.alertTips('你最多只能填写10万字的回答！');
				} else if (parseInt(data.state, 10) === 10000) {
					helper.alertTips('在社区内测期间，你还未获得发布内容的权限<br />但这不代表拉勾不爱你，<a href="http://form.mikecrm.com/a1GjwD" target="_blank">获得资格</a>');
				} else {
					helper.alertTips('不好意思，服务器开了个小差，回答问题失败！');
				}
			}).fail(function(jqXHR, textStatus, errorThrown) {
				helper.alertTips('不好意思，服务器开了个小差，回答问题失败！');
			});
		},
		/**
		 * [editAnswer 编辑回答]
		 * @param  {[Object]} data [答案表单数据]
		 * @return  {[Mixed]} undefined或者$.ajax promise
		 */
		editAnswer: function(data) {
			if (Object.prototype.toString.call(data) !== '[object Object]') { // 简单的参数校验
				return;
			}

			return $.lgAjax({
				url: config.url.editAnswer,
				type: 'POST',
				data: data,
				dataType: 'json'
			}).done(function(data, textStatus, jqXHR) {
				if (parseInt(data.state, 10) === 1) {
					window.location.reload();
				} else if (parseInt(data.state, 10) === 304) {
					PASSPORT.loginPopup();
				} else if (parseInt(data.state, 10) === 210) {
					helper.alertTips('你最多只能填写10万字的回答！');
				}  else if (parseInt(data.state, 10) === 999) {
					helper.alertTips(data.message);
				} else if (parseInt(data.state, 10) === 10000) {
					helper.alertTips('你无权执行该操作！');
				} else {
					helper.alertTips('不好意思，服务器开了个小差，编辑答案失败！');
				}
			}).fail(function(jqXHR, textStatus, errorThrown) {
				helper.alertTips('不好意思，服务器开了个小差，编辑答案失败！');
			});
		},
		/**
		 * [alertTips 通用提示框]
		 * @param  {[String]} tips [提示文本]
		 */
		alertTips: function(tips, handler) {
			$.colorbox({
				title: '提示',
				html: '<div class="tipsContent"><p>' + tips + '</p></div>',
				overlayClose: true,
				onClosed: function() {
					handler && handler();
				}
			});
		},
		/**
		 * [checkUserStatus 操作权限校验]
		 * @param {[Object]} option [校验配置]
		 * option.checkLogin {[Boolean]} [登录是否需要校验，默认true]
		 * option.checkActive {[Boolean]} [激活是否需要校验，默认true]
		 * option.checkCompleteInfo {[Boolean]} [完善信息是否需要校验，默认true]
		 * option.checkAuthority {[Boolean]} [白名单是否需要校验，默认true]
		 * @return {[Boolean]} [校验结果]
		 */
		checkUserStatus: function(option) {
			option = option || {};
			option.checkLogin = typeof option.checkLogin == 'boolean' ? option.checkLogin : true;
			option.checkActive = typeof option.checkActive == 'boolean' ? option.checkActive : true;
			option.checkCompleteInfo = typeof option.checkCompleteInfo == 'boolean' ? option.checkCompleteInfo : true;
			option.checkAuthority = typeof option.checkAuthority == 'boolean' ? option.checkAuthority : true;

			if (option.checkLogin && !global.curUserid) { // 用户未登录
				PASSPORT.loginPopup();
				return false;
			}

			if (option.checkActive && !global.curUserIsActive) { // 用户未激活
				document.location.href = GLOBAL_DOMAIN.actx +
					'/account/registerActive.html?callback=' +
					encodeURIComponent(document.location.href);
				return false;
			}

			if (option.checkCompleteInfo && !global.curUserIsCompleteInfo) { // 用户未完善个人信息
				document.location.href = GLOBAL_DOMAIN.zctx + '/';
				return false;
			} else if (option.checkAuthority && !global.curUserIsAuthority) { // 用户未被授权
				helper.alertTips('在社区内测期间，你还未获得发布内容的权限' +
					'<br />' +
					'但这不代表拉勾不爱你，' +
					'<a href="http://form.mikecrm.com/a1GjwD" target="_blank">获得资格</a>');
				return false;
			}

			return true; // 用户状态OK
		}
	};

	exports.helper = helper;

	/**
	 * [analyzeUri 判断是否跨域]
	 * @param  {[String]} url [要判断的url]
	 * @return {[Boolean]}    [判断结果]
	 */
	function analyzeUri(url) {

		/* url匹配正则 */
		var REGEXPURL = /^(https?):\/\/((?:[\u4E00-\u9FA5a-z0-9.-]|%[0-9A-F]{2}){2,})(?::(\d+))?((?:\/(?:[a-z0-9-._~!$&'()*+,;=:@]|%[0-9A-F]{2})*)*)(?:\?((?:[a-z0-9-._~!$&'()*+,;=:\/?@]|%[0-9A-F]{2})*))?(?:#((?:[a-z0-9-._~!$&'()*+,;=:\/?@]|%[0-9A-F]{2})*))?$/i;

		var loc = top.location;
		var origin = {
			protocol: loc.protocol.substring(0, loc.protocol.length - 1),
			hostname: loc.hostname,
			port: loc.port || '80' // 默认80端口
		};

		var targetMatches = REGEXPURL.exec(url);

		// targetMatches不为null，则说明有匹配【需要判断是否跨域】
		// targetMatches如果为null，则说明是不加域名的绝对地址请求，例如：'/a/c.json'【不用跨域】
		if (targetMatches && targetMatches.length) {
			var target = {
				protocol: targetMatches[1],
				hostname: targetMatches[2],
				port: targetMatches[3] || '80'
			};

			// 如果跨域
			if (origin.protocol != target.protocol || origin.hostname != target.hostname || origin.port != target.port) {
				return true;
			} else {
				return false;
			}
		} else {
			return false;
		}

	}

	/*function invitation() {
		var lagouCodes = [
			"  __                                         \r\n",
			" /\\ \\                                        \r\n",
			" \\ \\ \\         __       __     ___   __  __  \r\n",
			"  \\ \\ \\  __  /\'__`\\   /\'_ `\\  / __`\\/\\ \\/\\ \\ \r\n",
			"   \\ \\ \\L\\ \\/\\ \\L\\.\\_/\\ \\L\\ \\/\\ \\L\\ \\ \\ \\_\\ \\\r\n",
			"    \\ \\____/\\ \\__/.\\_\\ \\____ \\ \\____/\\ \\____/\r\n",
			"     \\/___/  \\/__/\\/_/\\/___L\\ \\/___/  \\/___/ \r\n",
			"                        /\\____/              \r\n",
			"                        \\_/__/               "
		].join('');

		console.log(lagouCodes);

		console.group('%c你想知道穿山甲到底说了什么吗？看过来看过来→_→https://www.lagou.com/jobs/1869713.html', 'font-size: 16px; font-weight: bold; color: #00b38a;');　　　　
		console.log('我们正在寻找并肩战斗的小伙伴，如果你有兴趣加入我们的前端团队，欢迎把你的简历砸过来');　　　　
		console.log('%cfridayhu@lagou.com fayipan@lagou.com（ 邮件标题请以“姓名-来自console”命名）', 'color: red;');
		console.groupEnd();
	}

	console && invitation();*/

});

/*!community/modules/index/recommended-topic/main.js*/
;/**
 * 问答社区-首页-推荐话题
 * 
 * @author fridayhu@lagou.com
 * 
 */
define('community/modules/index/recommended-topic/main', ['require', 'exports', 'module', 'community/modules/common/main', 'dep/artTemplate/dist/template'], function(require, exports, module) {

	var config = require('community/modules/common/main').config,
		helper = require('community/modules/common/main').helper;
	var template = require('dep/artTemplate/dist/template');

	// 加载推荐话题
	var isLoadingRecommendedTopic = false;

	// 首屏
	getRecommendedTopic();
	// 换一换
	// $('#changeRecommendedTopic').click(getRecommendedTopic);

	function getRecommendedTopic() {
		if (isLoadingRecommendedTopic) {
			return;
		}
		isLoadingRecommendedTopic = true;
		$('#changeRecommendedTopic').hide();
		$('#recommendedTopic .recommended_loading').show();
		helper.ajax({
			url: config.indexURL.getRecommendedTopic,
			data: {
				num: 4
			}
		}).done(function(data) {
			if (data.state == 1 && data.content.data) {
				var tpl = "{{each hotTopicList as hotTopic index}}\n<li>\n\t<a class=\"topic_img_link fl\" href=\"{{FE_zbase}}/topic/{{hotTopic.topicId}}.html\" target=\"_blank\" data-lg-tj-id=\"1eN0\" data-lg-tj-no=\"00{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{hotTopic.topicId}}\">\n\t\t{{if hotTopic.topicLogo && hotTopic.topicLogo != ''}}\n\t\t\t<img class=\"topic_img fl\" src=\"{{FE_lgsbase}}/{{hotTopic.topicLogo}}\" width=\"74\" height=\"74\" alt=\"{{hotTopic.topicTitle}}\">\n\t\t{{else}}\n\t\t\t<img class=\"topic_img fl\" src=\"//www.lgstatic.com/lg-community-fed/community/modules/common/img/topic-img-default_122f416.png\" width=\"74\" height=\"74\" alt=\"{{hotTopic.topicTitle}}\">\n\t\t{{/if}}\n\t</a>\n\t<strong class=\"topic_name\" data-topic-id=\"{{hotTopic.topicId}}\"><a href=\"{{FE_zbase}}/topic/{{hotTopic.topicId}}.html\" target=\"_blank\" data-lg-tj-id=\"1gk0\" data-lg-tj-no=\"00{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{hotTopic.topicId}}\">{{if hotTopic.topicTitle && hotTopic.topicTitle.length > 6}}{{hotTopic.topicTitle.substring(0,5)}}...{{else}}{{hotTopic.topicTitle}}{{/if}}</a></strong>\n\t{{if hotTopic.isAttention}}\n\t\t<a class=\"follow_btn btn has_follow btn_cancel\" href=\"javascript:;\" data-topic-id=\"{{hotTopic.topicId}}\" data-lg-tj-id=\"1gl0\" data-lg-tj-no=\"00{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{hotTopic.topicId}}\">已关注</a>\n\t{{else}}\n\t\t<a class=\"follow_btn btn\" href=\"javascript:;\" data-topic-id=\"{{hotTopic.topicId}}\" data-lg-tj-id=\"1gl0\" data-lg-tj-no=\"00{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{hotTopic.topicId}}\">关注</a>\n\t{{/if}}\n</li>\n{{/each}}\n";
				var htmlStr = template.compile(tpl)({
					hotTopicList: data.content.data.hotTopicList,
					FE_base: GLOBAL_DOMAIN.ctx,
					FE_zbase: GLOBAL_DOMAIN.zctx,
					FE_lgsbase: GLOBAL_DOMAIN.lgsctx,
					cdndomain: window.GLOBAL_CDN_DOMAIN
				});
				$('#recommendedTopic ul.recommended_body').empty().append(htmlStr);
				if (!data.content.data.hotTopicList || data.content.data.hotTopicList.length < 1) {
					$('.news_recommended_topic').remove();
				}
			} else {
				console.log(data.message);
			}
		}).fail(function() {
			console.log('getRecommendedTopic error');
		}).always(function() {
			isLoadingRecommendedTopic = false;
			$('#recommendedTopic .recommended_loading').hide();
			$('#changeRecommendedTopic').show();
		});
	}

	// 关注
	var followLoadingHtml = '<div class="loading2">Loading...</div>';
	$('#recommendedTopic').on('click', '.follow_btn', function(e) {
		var $this = $(this);
		if ($this.data('isLoading')) {
			return;
		}
		var topicId = $this.attr('data-topic-id');
		var originHtml = $this.html();
		$this.html(followLoadingHtml);
		$this.data('isLoading', true);
		if ($this.hasClass('has_follow')) {
			// 取消关注
			helper.cancelFollwTopic(topicId, {
				done: function(data) {
					$this.removeClass('has_follow').removeClass('btn_cancel');
					$this.html('关注');
				},
				fail: function() {
					$this.html(originHtml);
				},
				always: function() {
					$this.removeData('isLoading');
				}
			});
		} else {
			// 关注
			helper.followTopic(topicId, {
				done: function(data) {
					$this.addClass('has_follow').addClass('btn_cancel');;
					$this.html('已关注');
				},
				fail: function() {
					$this.html(originHtml);
				},
				always: function() {
					$this.removeData('isLoading');
				}
			});
		}
	});
	$('#recommendedTopic').on('mouseenter', '.follow_btn.has_follow', function(e) {
		$(this).html('取消');
	});
	$('#recommendedTopic').on('mouseleave', '.follow_btn.has_follow', function(e) {
		$(this).html('已关注');
	});

});

/*!dep/jquery.imgcutter/dist/jquery.imgcutter.js*/
;(function(root, factory) {
    if (typeof define === 'function' && define.amd) {
        define('dep/jquery.imgcutter/dist/jquery.imgcutter', ['jquery'], factory);
    } else if (typeof exports === "object") {
        module.exports = factory(require('jquery'));
    } else {
        factory(root.$);
    }
}(this, function($) {
    'use strict';

    $.fn.imgcutter = function(opts) {
        if (!$(this).is('input[type=file]')) {
            return;
        }

        var imgCutter = $(this).data('imgcutter');
        if (typeof opts === 'string') {
            if (imgCutter && imgCutter[opts]) {
                return imgCutter[opts].apply(imgCutter, Array.prototype.slice.call(arguments, 1));
            }
            return;
        }
        if (imgCutter) {
            return this;
        }

        var $container;
        if (opts.container) {
            if (opts.container instanceof jQuery) {
                $container = opts.container;
            } else {
                $container = $(opts.container);
            }
            if ($container.length) {
                var imgCutter = new ImgCutter(opts, $container, $(this));
                $(this).data('imgcutter', imgCutter);
                imgCutter.init();
                return this;
            }
        }
    }

    var defaults = {
        container: '',
        previewrWidth: 300,
        previewrHeight: 300,
        selectorWidth: 250,
        selectorHeight: 250,
        sliderLength: 200,
        enlargeMax: 2,
        clickEnlarge: true,
        enlargeRate: 'all',
        beforePreview: null
    }

    function ImgCutter(opts, $container, $input) {
        opts = $.extend(true, {}, defaults, opts);

        this.previewrWidth = parseInt(opts.previewrWidth);
        this.previewrHeight = parseInt(opts.previewrHeight);
        this.selectorWidth = parseInt(opts.selectorWidth);
        this.selectorHeight = parseInt(opts.selectorHeight);
        this.sliderLength = parseInt(opts.sliderLength);
        this.enlargeMax = opts.enlargeMax;
        this.clickEnlarge = opts.clickEnlarge;
        this.enlargeRate = opts.enlargeRate;
        this.beforePreview = opts.beforePreview;

        this.$input = $input;
        this.$container = $container;
        this.$previewr = null;
        this.$inner = null;
        this.$outer = null;
        this.$slider = null;
        this.$sliderHandle = null;
        this.clear();
    }

    $.extend(ImgCutter.prototype, {
        init: function() {
            this.$container.html([
                '<div class="imgcutter-previewr">',
                    '<div class="imgcutter-selector imgcutter-shadow"></div>',
                    '<div class="imgcutter-selector imgcutter-inner"></div>',
                    '<div class="imgcutter-selector imgcutter-outer"></div>',
                '</div>',
                '<div class="imgcutter-slider">',
                    '<span class="imgcutter-slider-reduce"></span>',
                    '<span class="imgcutter-slider-handler"></span>',
                    '<span class="imgcutter-slider-enlarge"></span>',
                '</div>'
            ].join(''));

            this.$previewr = this.$container.children('.imgcutter-previewr').css({
                width: this.previewrWidth,
                height: this.previewrHeight
            });

            this.$previewr.children('.imgcutter-selector').css({
                width: this.selectorWidth,
                height: this.selectorHeight,
                'margin-left': -this.selectorWidth / 2,
                'margin-top': -this.selectorHeight / 2
            });
            this.$inner = this.$previewr.children('.imgcutter-inner');
            this.$outer = this.$previewr.children('.imgcutter-outer');

            this.$slider = this.$container.children('.imgcutter-slider').css({
                width: this.sliderLength,
                'margin-left': (this.previewrWidth - this.sliderLength) / 2
            });
            this.clickEnlarge && this.$slider.css('cursor', 'pointer');
            this.$sliderHandle = this.$slider.children('.imgcutter-slider-handler');

            this.initEvent();
        },

        initEvent: function() {
            var ins = this;

            this.$input.on('change.imgcutter', function(e) {
                ins.preview(e);
            });

            // 防止ie8及以下版本在拖动图片或滑块时选中文本
            this.$container.on('selectstart.imgcutter', function(e) {
                e.preventDefault();
            });

            this.$previewr.on('mousedown.imgcutter', function(e) {
                e.preventDefault();
                var distanceY = e.clientY - parseFloat(ins.$photo.css('top'));
                var distanceX = e.clientX - parseFloat(ins.$photo.css('left'));
                var currentWidth = ins.$photo.width();
                var currentHeight = ins.$photo.height();

                var drag = function(e) {
                    var newLeft = ins.block(ins.selectorWidth - currentWidth, e.clientX - distanceX, 0);
                    var newTop = ins.block(ins.selectorHeight - currentHeight, e.clientY - distanceY, 0);
                    ins.$photo.css({
                        top: newTop,
                        left: newLeft
                    });
                }
                $(document)
                    .on('mousemove', drag)
                    .one('mouseup', function(e) {
                        $(this).off('mousemove', drag);
                    });
            });

            this.$sliderHandle.on('mousedown.imgcutter', function(e) {
                e.preventDefault();
                if (!ins.beginWidth) {
                    return;
                }

                var $handler = $(this);
                var distanceX = e.clientX - parseFloat($handler.css('left'));

                var drag = function(e) {
                    var prevLeft = parseFloat($handler.css('left'));
                    var left = ins.block(0, e.clientX - distanceX, ins.sliderLength);
                    $handler.css('left', left);
                    prevLeft !== left && ins.change(left / ins.sliderLength, left < prevLeft);
                }

                $(document)
                    .on('mousemove', drag)
                    .one('mouseup', function() {
                        $(this).off('mousemove', drag);
                    });
            });

            if (this.clickEnlarge) {
                this.$slider.on('mousedown.imgcutter', function(e) {
                    if (!ins.beginWidth) {
                        return;
                    }
                    if (e.target === ins.$sliderHandle[0]) {
                        return;
                    }

                    var newScale;

                    if (e.clientX < $(this).offset().left ||
                        e.clientX > $(this).offset().left + ins.sliderLength) {
                        return;
                    }

                    var isReduce = e.clientX < ins.$sliderHandle.offset().left;
                    if (ins.enlargeRate === 'all') {
                        newScale = (e.clientX - $(this).offset().left) / ins.sliderLength;
                    } else {
                        var currentScale = parseFloat(ins.$sliderHandle.css('left')) / ins.sliderLength;
                        if (!isReduce) {
                            newScale = Math.min(currentScale + ins.enlargeRate, 1);
                        } else {
                            newScale = Math.max(0, currentScale - ins.enlargeRate);
                        }
                    }
                    ins.$sliderHandle.css('left', ins.sliderLength * newScale);
                    ins.change(newScale, isReduce);
                });
            }
        },

        preview: function(e) {
            var input = this.$input[0];
            var ins = this;
            var val = this.$input.val();
            // ie edge将input[type="file"]的value设置为空时，依然会触发change事件
            if (val === '') {
                return;
            }

            if (document.selection) {
                input.select();
                input.blur();
                if (document.selection.createRange().text === '') {
                    return;
                }
            }

            if (this.beforePreview) {
                var extension = val.substr(val.lastIndexOf('.') + 1);
                if (!this.beforePreview.call(input, e, extension)) {
                    this.$inner && this.$inner.empty();
                    this.$outer && this.$outer.empty();
                    this.clear();
                    return;
                }
            }

            // chrome/firefox/ie10及以上版本可使用HTML5 File API预览图片
            if (input.files && input.files[0]) {
                if (!this.$photos) {
                    var photoHtml = '<img class="imgcutter-photo" />';
                    this.$inner.html(photoHtml);
                    this.$outer.html(photoHtml);
                    this.$photo = this.$previewr.find('.imgcutter-photo');
                }

                var reader = new FileReader();
                reader.onload = function(e) {
                    ins.$photo.prop('src', e.target.result);
                }
                reader.readAsDataURL(input.files[0]);

                this.$photo.on('load', function() {
                    ins.originalWidth = this.naturalWidth;
                    ins.originalHeight = this.naturalHeight;
                    ins.autoSize();
                    $(this).css({
                        width: ins.beginWidth,
                        height: ins.beginHeight,
                        top: -(ins.beginHeight - ins.selectorHeight) / 2,
                        left: -(ins.beginWidth - ins.selectorWidth) / 2
                    });
                });
            } else {
                // ie9及以下版本通过ie支持的滤镜来预览图片
                if (!this.$photos) {
                    var photoHtml = '<div class="imgcutter-photo"></div>';
                    this.$inner.html(photoHtml);
                    this.$outer.html(photoHtml);
                    this.$photo = this.$previewr.find('.imgcutter-photo')
                        // imgcutter-photo-fake用来获取图片的实际大小，如果display为none，则获取不到
                        // 为了防止在获取时整个容器被设置为隐藏，所以将imgcutter-photo-fake append到body中，并且设置位置在可视区域外
                    $('<img class="imgcutter-photo-fake" />')
                        .appendTo($('body'))
                        .css({
                            position: 'absolute',
                            top: -9999,
                            left: 0,
                            filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image)'
                        });
                }

                input.select();
                input.blur();
                var src = document.selection.createRange().text;
                // 需将imgcutter-photo-fake隐藏再显示，才能清除之前图片的height/width
                var $fakePhoto = $('.imgcutter-photo-fake').hide().show();
                var fakePhoto = $fakePhoto[0];
                fakePhoto.filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src = src;
                this.originalWidth = fakePhoto.offsetWidth;
                this.originalHeight = fakePhoto.offsetHeight;
                this.autoSize();
                $fakePhoto.hide();

                this.$photo.css({
                    width: this.beginWidth,
                    height: this.beginHeight,
                    top: -(this.beginHeight - this.selectorHeight) / 2,
                    left: -(this.beginWidth - this.selectorWidth) / 2,
                    filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="' + src + '"'
                });
            }

            this.$sliderHandle.css('left', 0);
        },

        autoSize: function() {
            if (this.originalWidth / this.originalHeight >= this.selectorWidth / this.selectorHeight) {
                this.beginWidth = this.selectorHeight * this.originalWidth / this.originalHeight;
                this.beginHeight = this.selectorHeight;
            } else {
                this.beginHeight = this.selectorWidth * this.originalHeight / this.originalWidth;
                this.beginWidth = this.selectorWidth;
            }
        },

        block: function(min, num, max) {
            return num > max ? max : num < min ? min : num;
        },

        change: function(scale, isReduce) {
            var currentWidth = this.$photo.width();
            var currentHeight = this.$photo.height();
            var currentLeft = parseFloat(this.$photo.css('left'));
            var currentTop = parseFloat(this.$photo.css('top'));

            var newWidth = this.beginWidth * (scale * (this.enlargeMax - 1) + 1);
            var newHeight = this.beginHeight * (scale * (this.enlargeMax - 1) + 1);
            var newLeft = -((-currentLeft + this.selectorWidth / 2) * newWidth / currentWidth - this.selectorWidth / 2);
            newLeft = isReduce ? this.block(this.selectorWidth - newWidth, newLeft, 0) : newLeft;
            var newTop = -((-currentTop + this.selectorHeight / 2) * newHeight / currentHeight - this.selectorHeight / 2);
            newTop = isReduce ? this.block(this.selectorHeight - newHeight, newTop, 0) : newTop;

            this.$photo.css({
                width: newWidth,
                height: newHeight,
                left: newLeft,
                top: newTop
            });
        },

        clear: function() {
            this.$photo = null;
            this.originalWidth = 0;
            this.originalHeight = 0;
            this.beginWidth = 0;
            this.beginHeight = 0;
        },

        getCutInfo: function() {
            return {
                previewrWidth: this.previewrWidth,
                previewrHeight: this.previewrHeight,
                selectorWidth: this.selectorWidth,
                selectorHeight: this.selectorHeight,
                originalWidth: this.originalWidth,
                originalHeight: this.originalHeight,
                currentWidth: this.$photo ? this.$photo.width() : 0,
                currentHeight: this.$photo ? this.$photo.height() : 0,
                selectorX: this.$photo ? Math.abs(parseFloat(this.$photo.css('left'))) : 0,
                selectorY: this.$photo ? Math.abs(parseFloat(this.$photo.css('top'))) : 0
            }
        },

        cut: function(container, width, height) {
            var info = this.getCutInfo();
            if (info.currentWidth === 0) {
                return;
            }

            width = parseFloat(width);
            height = parseFloat(height);
            var scale = Math.max(width / info.selectorWidth, height / info.selectorHeight);
            var newWidth = info.currentWidth * scale;
            var newHeight = info.currentHeight * scale;
            var newX = info.selectorX * scale;
            var newY = info.selectorY * scale;

            var $container = container instanceof jQuery ? container : $(container);
            var positionStyle = $container.css('position');
            if ($.inArray(positionStyle, ['absolute', 'fixed', 'relative']) === -1) {
                $container.css('position', 'relative');
            }
            $container.css({
                width: width,
                height: height,
                overflow: 'hidden'
            });

            var supportFileApi = this.$photo.is('img');
            var $photo = $container.children('.imgcutter-cut-preview');
            if ($photo.length === 0) {
                if (supportFileApi) {
                    $photo = $('<img class="imgcutter-cut-preview" />');
                } else {
                    $photo = $('<div class="imgcutter-cut-preview"></div>');
                }
            }

            if (supportFileApi) {
                $photo[0].src = this.$photo[0].src;
            } else {
                var src = this.$photo[0].filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src;
                $photo.css('filter', 'progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="' + src + '"');
            }
            $photo.appendTo($container).css({
                position: 'absolute',
                top: -newY,
                left: -newX,
                width: newWidth,
                height: newHeight
            });
        },

        destory: function() {
            this.$input.off('change.imgcutter');
            this.$container.off('selectstart.imgcutter');
            this.$previewr.off('mousedown.imgcutter');
            this.$sliderHandle.off('mousedown.imgcutter');
            this.clickEnlarge && this.$slider.off('mousedown.imgcutter');
            this.$input.removeData('imgcutter');
            this.$container.empty();
            $('.imgcutter-photo-fake').remove();
        }
    });
}));

/*!dep/jquery-form/jquery.form.js*/
;/*!
 * jQuery Form Plugin
 * version: 3.46.0-2013.11.21
 * Requires jQuery v1.5 or later
 * Copyright (c) 2013 M. Alsup
 * Examples and documentation at: http://malsup.com/jquery/form/
 * Project repository: https://github.com/malsup/form
 * Dual licensed under the MIT and GPL licenses.
 * https://github.com/malsup/form#copyright-and-license
 */
/*global ActiveXObject */

// AMD support
(function (factory) {
    if (typeof define === 'function' && define.amd) {
        // using AMD; register as anon module
        define('dep/jquery-form/jquery.form', ['jquery'], factory);
    } else {
        // no AMD; invoke directly
        factory( (typeof(jQuery) != 'undefined') ? jQuery : window.Zepto );
    }
}

(function($) {
"use strict";

/*
    Usage Note:
    -----------
    Do not use both ajaxSubmit and ajaxForm on the same form.  These
    functions are mutually exclusive.  Use ajaxSubmit if you want
    to bind your own submit handler to the form.  For example,

    $(document).ready(function() {
        $('#myForm').on('submit', function(e) {
            e.preventDefault(); // <-- important
            $(this).ajaxSubmit({
                target: '#output'
            });
        });
    });

    Use ajaxForm when you want the plugin to manage all the event binding
    for you.  For example,

    $(document).ready(function() {
        $('#myForm').ajaxForm({
            target: '#output'
        });
    });

    You can also use ajaxForm with delegation (requires jQuery v1.7+), so the
    form does not have to exist when you invoke ajaxForm:

    $('#myForm').ajaxForm({
        delegation: true,
        target: '#output'
    });

    When using ajaxForm, the ajaxSubmit function will be invoked for you
    at the appropriate time.
*/

/**
 * Feature detection
 */
var feature = {};
feature.fileapi = $("<input type='file'/>").get(0).files !== undefined;
feature.formdata = window.FormData !== undefined;

var hasProp = !!$.fn.prop;

// attr2 uses prop when it can but checks the return type for
// an expected string.  this accounts for the case where a form 
// contains inputs with names like "action" or "method"; in those
// cases "prop" returns the element
$.fn.attr2 = function() {
    if ( ! hasProp )
        return this.attr.apply(this, arguments);
    var val = this.prop.apply(this, arguments);
    if ( ( val && val.jquery ) || typeof val === 'string' )
        return val;
    return this.attr.apply(this, arguments);
};

/**
 * ajaxSubmit() provides a mechanism for immediately submitting
 * an HTML form using AJAX.
 */
$.fn.ajaxSubmit = function(options) {
    /*jshint scripturl:true */

    // fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
    if (!this.length) {
        log('ajaxSubmit: skipping submit process - no element selected');
        return this;
    }

    var method, action, url, $form = this;

    if (typeof options == 'function') {
        options = { success: options };
    }
    else if ( options === undefined ) {
        options = {};
    }

    method = options.type || this.attr2('method');
    action = options.url  || this.attr2('action');

    url = (typeof action === 'string') ? $.trim(action) : '';
    url = url || window.location.href || '';
    if (url) {
        // clean url (don't include hash vaue)
        url = (url.match(/^([^#]+)/)||[])[1];
    }

    options = $.extend(true, {
        url:  url,
        success: $.ajaxSettings.success,
        type: method || $.ajaxSettings.type,
        iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank'
    }, options);

    // hook for manipulating the form data before it is extracted;
    // convenient for use with rich editors like tinyMCE or FCKEditor
    var veto = {};
    this.trigger('form-pre-serialize', [this, options, veto]);
    if (veto.veto) {
        log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
        return this;
    }

    // provide opportunity to alter form data before it is serialized
    if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
        log('ajaxSubmit: submit aborted via beforeSerialize callback');
        return this;
    }

    var traditional = options.traditional;
    if ( traditional === undefined ) {
        traditional = $.ajaxSettings.traditional;
    }

    var elements = [];
    var qx, a = this.formToArray(options.semantic, elements);
    if (options.data) {
        options.extraData = options.data;
        qx = $.param(options.data, traditional);
    }

    // give pre-submit callback an opportunity to abort the submit
    if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
        log('ajaxSubmit: submit aborted via beforeSubmit callback');
        return this;
    }

    // fire vetoable 'validate' event
    this.trigger('form-submit-validate', [a, this, options, veto]);
    if (veto.veto) {
        log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
        return this;
    }

    var q = $.param(a, traditional);
    if (qx) {
        q = ( q ? (q + '&' + qx) : qx );
    }
    if (options.type.toUpperCase() == 'GET') {
        options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
        options.data = null;  // data is null for 'get'
    }
    else {
        options.data = q; // data is the query string for 'post'
    }

    var callbacks = [];
    if (options.resetForm) {
        callbacks.push(function() { $form.resetForm(); });
    }
    if (options.clearForm) {
        callbacks.push(function() { $form.clearForm(options.includeHidden); });
    }

    // perform a load on the target only if dataType is not provided
    if (!options.dataType && options.target) {
        var oldSuccess = options.success || function(){};
        callbacks.push(function(data) {
            var fn = options.replaceTarget ? 'replaceWith' : 'html';
            $(options.target)[fn](data).each(oldSuccess, arguments);
        });
    }
    else if (options.success) {
        callbacks.push(options.success);
    }

    options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg
        var context = options.context || this ;    // jQuery 1.4+ supports scope context
        for (var i=0, max=callbacks.length; i < max; i++) {
            callbacks[i].apply(context, [data, status, xhr || $form, $form]);
        }
    };

    if (options.error) {
        var oldError = options.error;
        options.error = function(xhr, status, error) {
            var context = options.context || this;
            oldError.apply(context, [xhr, status, error, $form]);
        };
    }

     if (options.complete) {
        var oldComplete = options.complete;
        options.complete = function(xhr, status) {
            var context = options.context || this;
            oldComplete.apply(context, [xhr, status, $form]);
        };
    }

    // are there files to upload?

    // [value] (issue #113), also see comment:
    // https://github.com/malsup/form/commit/588306aedba1de01388032d5f42a60159eea9228#commitcomment-2180219
    var fileInputs = $('input[type=file]:enabled', this).filter(function() { return $(this).val() !== ''; });

    var hasFileInputs = fileInputs.length > 0;
    var mp = 'multipart/form-data';
    var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);

    var fileAPI = feature.fileapi && feature.formdata;
    log("fileAPI :" + fileAPI);
    var shouldUseFrame = (hasFileInputs || multipart) && !fileAPI;

    var jqxhr;

    // options.iframe allows user to force iframe mode
    // 06-NOV-09: now defaulting to iframe mode if file input is detected
    if (options.iframe !== false && (options.iframe || shouldUseFrame)) {
        // hack to fix Safari hang (thanks to Tim Molendijk for this)
        // see:  http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
        if (options.closeKeepAlive) {
            $.get(options.closeKeepAlive, function() {
                jqxhr = fileUploadIframe(a);
            });
        }
        else {
            jqxhr = fileUploadIframe(a);
        }
    }
    else if ((hasFileInputs || multipart) && fileAPI) {
        jqxhr = fileUploadXhr(a);
    }
    else {
        jqxhr = $.lgAjax(options);
    }

    $form.removeData('jqxhr').data('jqxhr', jqxhr);

    // clear element array
    for (var k=0; k < elements.length; k++)
        elements[k] = null;

    // fire 'notify' event
    this.trigger('form-submit-notify', [this, options]);
    return this;

    // utility fn for deep serialization
    function deepSerialize(extraData){
        var serialized = $.param(extraData, options.traditional).split('&');
        var len = serialized.length;
        var result = [];
        var i, part;
        for (i=0; i < len; i++) {
            // #252; undo param space replacement
            serialized[i] = serialized[i].replace(/\+/g,' ');
            part = serialized[i].split('=');
            // #278; use array instead of object storage, favoring array serializations
            result.push([decodeURIComponent(part[0]), decodeURIComponent(part[1])]);
        }
        return result;
    }

     // XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz)
    function fileUploadXhr(a) {
        var formdata = new FormData();

        for (var i=0; i < a.length; i++) {
            formdata.append(a[i].name, a[i].value);
        }

        if (options.extraData) {
            var serializedData = deepSerialize(options.extraData);
            for (i=0; i < serializedData.length; i++)
                if (serializedData[i])
                    formdata.append(serializedData[i][0], serializedData[i][1]);
        }

        options.data = null;

        var s = $.extend(true, {}, $.ajaxSettings, options, {
            contentType: false,
            processData: false,
            cache: false,
            type: method || 'POST'
        });

        if (options.uploadProgress) {
            // workaround because jqXHR does not expose upload property
            s.xhr = function() {
                var xhr = $.ajaxSettings.xhr();
                if (xhr.upload) {
                    xhr.upload.addEventListener('progress', function(event) {
                        var percent = 0;
                        var position = event.loaded || event.position; /*event.position is deprecated*/
                        var total = event.total;
                        if (event.lengthComputable) {
                            percent = Math.ceil(position / total * 100);
                        }
                        options.uploadProgress(event, position, total, percent);
                    }, false);
                }
                return xhr;
            };
        }

        s.data = null;
        var beforeSend = s.beforeSend;
        s.beforeSend = function(xhr, o) {
            //Send FormData() provided by user
            if (options.formData)
                o.data = options.formData;
            else
                o.data = formdata;
            if(beforeSend)
                beforeSend.call(this, xhr, o);
        };
        return $.lgAjax(s);
    }

    // private function for handling file uploads (hat tip to YAHOO!)
    function fileUploadIframe(a) {
        var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle;
        var deferred = $.Deferred();

        // #341
        deferred.abort = function(status) {
            xhr.abort(status);
        };

        if (a) {
            // ensure that every serialized input is still enabled
            for (i=0; i < elements.length; i++) {
                el = $(elements[i]);
                if ( hasProp )
                    el.prop('disabled', false);
                else
                    el.removeAttr('disabled');
            }
        }

        s = $.extend(true, {}, $.ajaxSettings, options);
        s.context = s.context || s;
        id = 'jqFormIO' + (new Date().getTime());
        if (s.iframeTarget) {
            $io = $(s.iframeTarget);
            n = $io.attr2('name');
            if (!n)
                 $io.attr2('name', id);
            else
                id = n;
        }
        else {
            $io = $('<iframe name="' + id + '" src="'+ s.iframeSrc +'" />');
            $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
        }
        io = $io[0];


        xhr = { // mock object
            aborted: 0,
            responseText: null,
            responseXML: null,
            status: 0,
            statusText: 'n/a',
            getAllResponseHeaders: function() {},
            getResponseHeader: function() {},
            setRequestHeader: function() {},
            abort: function(status) {
                var e = (status === 'timeout' ? 'timeout' : 'aborted');
                log('aborting upload... ' + e);
                this.aborted = 1;

                try { // #214, #257
                    if (io.contentWindow.document.execCommand) {
                        io.contentWindow.document.execCommand('Stop');
                    }
                }
                catch(ignore) {}

                $io.attr('src', s.iframeSrc); // abort op in progress
                xhr.error = e;
                if (s.error)
                    s.error.call(s.context, xhr, e, status);
                if (g)
                    $.event.trigger("ajaxError", [xhr, s, e]);
                if (s.complete)
                    s.complete.call(s.context, xhr, e);
            }
        };

        g = s.global;
        // trigger ajax global events so that activity/block indicators work like normal
        if (g && 0 === $.active++) {
            $.event.trigger("ajaxStart");
        }
        if (g) {
            $.event.trigger("ajaxSend", [xhr, s]);
        }

        if (s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false) {
            if (s.global) {
                $.active--;
            }
            deferred.reject();
            return deferred;
        }
        if (xhr.aborted) {
            deferred.reject();
            return deferred;
        }

        // add submitting element to data if we know it
        sub = form.clk;
        if (sub) {
            n = sub.name;
            if (n && !sub.disabled) {
                s.extraData = s.extraData || {};
                s.extraData[n] = sub.value;
                if (sub.type == "image") {
                    s.extraData[n+'.x'] = form.clk_x;
                    s.extraData[n+'.y'] = form.clk_y;
                }
            }
        }

        var CLIENT_TIMEOUT_ABORT = 1;
        var SERVER_ABORT = 2;
                
        function getDoc(frame) {
            /* it looks like contentWindow or contentDocument do not
             * carry the protocol property in ie8, when running under ssl
             * frame.document is the only valid response document, since
             * the protocol is know but not on the other two objects. strange?
             * "Same origin policy" http://en.wikipedia.org/wiki/Same_origin_policy
             */
            
            var doc = null;
            
            // IE8 cascading access check
            try {
                if (frame.contentWindow) {
                    doc = frame.contentWindow.document;
                }
            } catch(err) {
                // IE8 access denied under ssl & missing protocol
                log('cannot get iframe.contentWindow document: ' + err);
            }

            if (doc) { // successful getting content
                return doc;
            }

            try { // simply checking may throw in ie8 under ssl or mismatched protocol
                doc = frame.contentDocument ? frame.contentDocument : frame.document;
            } catch(err) {
                // last attempt
                log('cannot get iframe.contentDocument: ' + err);
                doc = frame.document;
            }
            return doc;
        }

        // Rails CSRF hack (thanks to Yvan Barthelemy)
        var csrf_token = $('meta[name=csrf-token]').attr('content');
        var csrf_param = $('meta[name=csrf-param]').attr('content');
        if (csrf_param && csrf_token) {
            s.extraData = s.extraData || {};
            s.extraData[csrf_param] = csrf_token;
        }

        // take a breath so that pending repaints get some cpu time before the upload starts
        function doSubmit() {
            // make sure form attrs are set
            var t = $form.attr2('target'), a = $form.attr2('action');

            // update form attrs in IE friendly way
            form.setAttribute('target',id);
            if (!method || /post/i.test(method) ) {
                form.setAttribute('method', 'POST');
            }
            if (a != s.url) {
                form.setAttribute('action', s.url);
            }

            // ie borks in some cases when setting encoding
            if (! s.skipEncodingOverride && (!method || /post/i.test(method))) {
                $form.attr({
                    encoding: 'multipart/form-data',
                    enctype:  'multipart/form-data'
                });
            }

            // support timout
            if (s.timeout) {
                timeoutHandle = setTimeout(function() { timedOut = true; cb(CLIENT_TIMEOUT_ABORT); }, s.timeout);
            }

            // look for server aborts
            function checkState() {
                try {
                    var state = getDoc(io).readyState;
                    log('state = ' + state);
                    if (state && state.toLowerCase() == 'uninitialized')
                        setTimeout(checkState,50);
                }
                catch(e) {
                    log('Server abort: ' , e, ' (', e.name, ')');
                    cb(SERVER_ABORT);
                    if (timeoutHandle)
                        clearTimeout(timeoutHandle);
                    timeoutHandle = undefined;
                }
            }

            // add "extra" data to form if provided in options
            var extraInputs = [];
            try {
                if (s.extraData) {
                    for (var n in s.extraData) {
                        if (s.extraData.hasOwnProperty(n)) {
                           // if using the $.param format that allows for multiple values with the same name
                           if($.isPlainObject(s.extraData[n]) && s.extraData[n].hasOwnProperty('name') && s.extraData[n].hasOwnProperty('value')) {
                               extraInputs.push(
                               $('<input type="hidden" name="'+s.extraData[n].name+'">').val(s.extraData[n].value)
                                   .appendTo(form)[0]);
                           } else {
                               extraInputs.push(
                               $('<input type="hidden" name="'+n+'">').val(s.extraData[n])
                                   .appendTo(form)[0]);
                           }
                        }
                    }
                }

                if (!s.iframeTarget) {
                    // add iframe to doc and submit the form
                    $io.appendTo('body');
                }
                if (io.attachEvent)
                    io.attachEvent('onload', cb);
                else
                    io.addEventListener('load', cb, false);
                setTimeout(checkState,15);

                try {
                    form.submit();
                } catch(err) {
                    // just in case form has element with name/id of 'submit'
                    var submitFn = document.createElement('form').submit;
                    submitFn.apply(form);
                }
            }
            finally {
                // reset attrs and remove "extra" input elements
                form.setAttribute('action',a);
                if(t) {
                    form.setAttribute('target', t);
                } else {
                    $form.removeAttr('target');
                }
                $(extraInputs).remove();
            }
        }

        if (s.forceSync) {
            doSubmit();
        }
        else {
            setTimeout(doSubmit, 10); // this lets dom updates render
        }

        var data, doc, domCheckCount = 50, callbackProcessed;

        function cb(e) {
            if (xhr.aborted || callbackProcessed) {
                return;
            }
            
            doc = getDoc(io);
            if(!doc) {
                log('cannot access response document');
                e = SERVER_ABORT;
            }
            if (e === CLIENT_TIMEOUT_ABORT && xhr) {
                xhr.abort('timeout');
                deferred.reject(xhr, 'timeout');
                return;
            }
            else if (e == SERVER_ABORT && xhr) {
                xhr.abort('server abort');
                deferred.reject(xhr, 'error', 'server abort');
                return;
            }

            if (!doc || doc.location.href == s.iframeSrc) {
                // response not received yet
                if (!timedOut)
                    return;
            }
            if (io.detachEvent)
                io.detachEvent('onload', cb);
            else
                io.removeEventListener('load', cb, false);

            var status = 'success', errMsg;
            try {
                if (timedOut) {
                    throw 'timeout';
                }

                var isXml = s.dataType == 'xml' || doc.XMLDocument || $.isXMLDoc(doc);
                log('isXml='+isXml);
                if (!isXml && window.opera && (doc.body === null || !doc.body.innerHTML)) {
                    if (--domCheckCount) {
                        // in some browsers (Opera) the iframe DOM is not always traversable when
                        // the onload callback fires, so we loop a bit to accommodate
                        log('requeing onLoad callback, DOM not available');
                        setTimeout(cb, 250);
                        return;
                    }
                    // let this fall through because server response could be an empty document
                    //log('Could not access iframe DOM after mutiple tries.');
                    //throw 'DOMException: not available';
                }

                //log('response detected');
                var docRoot = doc.body ? doc.body : doc.documentElement;
                xhr.responseText = docRoot ? docRoot.innerHTML : null;
                xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
                if (isXml)
                    s.dataType = 'xml';
                xhr.getResponseHeader = function(header){
                    var headers = {'content-type': s.dataType};
                    return headers[header.toLowerCase()];
                };
                // support for XHR 'status' & 'statusText' emulation :
                if (docRoot) {
                    xhr.status = Number( docRoot.getAttribute('status') ) || xhr.status;
                    xhr.statusText = docRoot.getAttribute('statusText') || xhr.statusText;
                }

                var dt = (s.dataType || '').toLowerCase();
                var scr = /(json|script|text)/.test(dt);
                if (scr || s.textarea) {
                    // see if user embedded response in textarea
                    var ta = doc.getElementsByTagName('textarea')[0];
                    if (ta) {
                        xhr.responseText = ta.value;
                        // support for XHR 'status' & 'statusText' emulation :
                        xhr.status = Number( ta.getAttribute('status') ) || xhr.status;
                        xhr.statusText = ta.getAttribute('statusText') || xhr.statusText;
                    }
                    else if (scr) {
                        // account for browsers injecting pre around json response
                        var pre = doc.getElementsByTagName('pre')[0];
                        var b = doc.getElementsByTagName('body')[0];
                        if (pre) {
                            xhr.responseText = pre.textContent ? pre.textContent : pre.innerText;
                        }
                        else if (b) {
                            xhr.responseText = b.textContent ? b.textContent : b.innerText;
                        }
                    }
                }
                else if (dt == 'xml' && !xhr.responseXML && xhr.responseText) {
                    xhr.responseXML = toXml(xhr.responseText);
                }

                try {
                    data = httpData(xhr, dt, s);
                }
                catch (err) {
                    status = 'parsererror';
                    xhr.error = errMsg = (err || status);
                }
            }
            catch (err) {
                log('error caught: ',err);
                status = 'error';
                xhr.error = errMsg = (err || status);
            }

            if (xhr.aborted) {
                log('upload aborted');
                status = null;
            }

            if (xhr.status) { // we've set xhr.status
                status = (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) ? 'success' : 'error';
            }

            // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
            if (status === 'success') {
                if (s.success)
                    s.success.call(s.context, data, 'success', xhr);
                deferred.resolve(xhr.responseText, 'success', xhr);
                if (g)
                    $.event.trigger("ajaxSuccess", [xhr, s]);
            }
            else if (status) {
                if (errMsg === undefined)
                    errMsg = xhr.statusText;
                if (s.error)
                    s.error.call(s.context, xhr, status, errMsg);
                deferred.reject(xhr, 'error', errMsg);
                if (g)
                    $.event.trigger("ajaxError", [xhr, s, errMsg]);
            }

            if (g)
                $.event.trigger("ajaxComplete", [xhr, s]);

            if (g && ! --$.active) {
                $.event.trigger("ajaxStop");
            }

            if (s.complete)
                s.complete.call(s.context, xhr, status);

            callbackProcessed = true;
            if (s.timeout)
                clearTimeout(timeoutHandle);

            // clean up
            setTimeout(function() {
                if (!s.iframeTarget)
                    $io.remove();
                else  //adding else to clean up existing iframe response.
                    $io.attr('src', s.iframeSrc);
                xhr.responseXML = null;
            }, 100);
        }

        var toXml = $.parseXML || function(s, doc) { // use parseXML if available (jQuery 1.5+)
            if (window.ActiveXObject) {
                doc = new ActiveXObject('Microsoft.XMLDOM');
                doc.async = 'false';
                doc.loadXML(s);
            }
            else {
                doc = (new DOMParser()).parseFromString(s, 'text/xml');
            }
            return (doc && doc.documentElement && doc.documentElement.nodeName != 'parsererror') ? doc : null;
        };
        var parseJSON = $.parseJSON || function(s) {
            /*jslint evil:true */
            return window['eval']('(' + s + ')');
        };

        var httpData = function( xhr, type, s ) { // mostly lifted from jq1.4.4

            var ct = xhr.getResponseHeader('content-type') || '',
                xml = type === 'xml' || !type && ct.indexOf('xml') >= 0,
                data = xml ? xhr.responseXML : xhr.responseText;

            if (xml && data.documentElement.nodeName === 'parsererror') {
                if ($.error)
                    $.error('parsererror');
            }
            if (s && s.dataFilter) {
                data = s.dataFilter(data, type);
            }
            if (typeof data === 'string') {
                if (type === 'json' || !type && ct.indexOf('json') >= 0) {
                    data = parseJSON(data);
                } else if (type === "script" || !type && ct.indexOf("javascript") >= 0) {
                    $.globalEval(data);
                }
            }
            return data;
        };

        return deferred;
    }
};

/**
 * ajaxForm() provides a mechanism for fully automating form submission.
 *
 * The advantages of using this method instead of ajaxSubmit() are:
 *
 * 1: This method will include coordinates for <input type="image" /> elements (if the element
 *    is used to submit the form).
 * 2. This method will include the submit element's name/value data (for the element that was
 *    used to submit the form).
 * 3. This method binds the submit() method to the form for you.
 *
 * The options argument for ajaxForm works exactly as it does for ajaxSubmit.  ajaxForm merely
 * passes the options argument along after properly binding events for submit elements and
 * the form itself.
 */
$.fn.ajaxForm = function(options) {
    options = options || {};
    options.delegation = options.delegation && $.isFunction($.fn.on);

    // in jQuery 1.3+ we can fix mistakes with the ready state
    if (!options.delegation && this.length === 0) {
        var o = { s: this.selector, c: this.context };
        if (!$.isReady && o.s) {
            log('DOM not ready, queuing ajaxForm');
            $(function() {
                $(o.s,o.c).ajaxForm(options);
            });
            return this;
        }
        // is your DOM ready?  http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
        log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
        return this;
    }

    if ( options.delegation ) {
        $(document)
            .off('submit.form-plugin', this.selector, doAjaxSubmit)
            .off('click.form-plugin', this.selector, captureSubmittingElement)
            .on('submit.form-plugin', this.selector, options, doAjaxSubmit)
            .on('click.form-plugin', this.selector, options, captureSubmittingElement);
        return this;
    }

    return this.ajaxFormUnbind()
        .bind('submit.form-plugin', options, doAjaxSubmit)
        .bind('click.form-plugin', options, captureSubmittingElement);
};

// private event handlers
function doAjaxSubmit(e) {
    /*jshint validthis:true */
    var options = e.data;
    if (!e.isDefaultPrevented()) { // if event has been canceled, don't proceed
        e.preventDefault();
        $(e.target).ajaxSubmit(options); // #365
    }
}

function captureSubmittingElement(e) {
    /*jshint validthis:true */
    var target = e.target;
    var $el = $(target);
    if (!($el.is("[type=submit],[type=image]"))) {
        // is this a child element of the submit el?  (ex: a span within a button)
        var t = $el.closest('[type=submit]');
        if (t.length === 0) {
            return;
        }
        target = t[0];
    }
    var form = this;
    form.clk = target;
    if (target.type == 'image') {
        if (e.offsetX !== undefined) {
            form.clk_x = e.offsetX;
            form.clk_y = e.offsetY;
        } else if (typeof $.fn.offset == 'function') {
            var offset = $el.offset();
            form.clk_x = e.pageX - offset.left;
            form.clk_y = e.pageY - offset.top;
        } else {
            form.clk_x = e.pageX - target.offsetLeft;
            form.clk_y = e.pageY - target.offsetTop;
        }
    }
    // clear form vars
    setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 100);
}


// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
$.fn.ajaxFormUnbind = function() {
    return this.unbind('submit.form-plugin click.form-plugin');
};

/**
 * formToArray() gathers form element data into an array of objects that can
 * be passed to any of the following ajax functions: $.get, $.post, or load.
 * Each object in the array has both a 'name' and 'value' property.  An example of
 * an array for a simple login form might be:
 *
 * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
 *
 * It is this array that is passed to pre-submit callback functions provided to the
 * ajaxSubmit() and ajaxForm() methods.
 */
$.fn.formToArray = function(semantic, elements) {
    var a = [];
    if (this.length === 0) {
        return a;
    }

    var form = this[0];
    var els = semantic ? form.getElementsByTagName('*') : form.elements;
    if (!els) {
        return a;
    }

    var i,j,n,v,el,max,jmax;
    for(i=0, max=els.length; i < max; i++) {
        el = els[i];
        n = el.name;
        if (!n || el.disabled) {
            continue;
        }

        if (semantic && form.clk && el.type == "image") {
            // handle image inputs on the fly when semantic == true
            if(form.clk == el) {
                a.push({name: n, value: $(el).val(), type: el.type });
                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
            }
            continue;
        }

        v = $.fieldValue(el, true);
        if (v && v.constructor == Array) {
            if (elements)
                elements.push(el);
            for(j=0, jmax=v.length; j < jmax; j++) {
                a.push({name: n, value: v[j]});
            }
        }
        else if (feature.fileapi && el.type == 'file') {
            if (elements)
                elements.push(el);
            var files = el.files;
            if (files.length) {
                for (j=0; j < files.length; j++) {
                    a.push({name: n, value: files[j], type: el.type});
                }
            }
            else {
                // #180
                a.push({ name: n, value: '', type: el.type });
            }
        }
        else if (v !== null && typeof v != 'undefined') {
            if (elements)
                elements.push(el);
            a.push({name: n, value: v, type: el.type, required: el.required});
        }
    }

    if (!semantic && form.clk) {
        // input type=='image' are not found in elements array! handle it here
        var $input = $(form.clk), input = $input[0];
        n = input.name;
        if (n && !input.disabled && input.type == 'image') {
            a.push({name: n, value: $input.val()});
            a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
        }
    }
    return a;
};

/**
 * Serializes form data into a 'submittable' string. This method will return a string
 * in the format: name1=value1&amp;name2=value2
 */
$.fn.formSerialize = function(semantic) {
    //hand off to jQuery.param for proper encoding
    return $.param(this.formToArray(semantic));
};

/**
 * Serializes all field elements in the jQuery object into a query string.
 * This method will return a string in the format: name1=value1&amp;name2=value2
 */
$.fn.fieldSerialize = function(successful) {
    var a = [];
    this.each(function() {
        var n = this.name;
        if (!n) {
            return;
        }
        var v = $.fieldValue(this, successful);
        if (v && v.constructor == Array) {
            for (var i=0,max=v.length; i < max; i++) {
                a.push({name: n, value: v[i]});
            }
        }
        else if (v !== null && typeof v != 'undefined') {
            a.push({name: this.name, value: v});
        }
    });
    //hand off to jQuery.param for proper encoding
    return $.param(a);
};

/**
 * Returns the value(s) of the element in the matched set.  For example, consider the following form:
 *
 *  <form><fieldset>
 *      <input name="A" type="text" />
 *      <input name="A" type="text" />
 *      <input name="B" type="checkbox" value="B1" />
 *      <input name="B" type="checkbox" value="B2"/>
 *      <input name="C" type="radio" value="C1" />
 *      <input name="C" type="radio" value="C2" />
 *  </fieldset></form>
 *
 *  var v = $('input[type=text]').fieldValue();
 *  // if no values are entered into the text inputs
 *  v == ['','']
 *  // if values entered into the text inputs are 'foo' and 'bar'
 *  v == ['foo','bar']
 *
 *  var v = $('input[type=checkbox]').fieldValue();
 *  // if neither checkbox is checked
 *  v === undefined
 *  // if both checkboxes are checked
 *  v == ['B1', 'B2']
 *
 *  var v = $('input[type=radio]').fieldValue();
 *  // if neither radio is checked
 *  v === undefined
 *  // if first radio is checked
 *  v == ['C1']
 *
 * The successful argument controls whether or not the field element must be 'successful'
 * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
 * The default value of the successful argument is true.  If this value is false the value(s)
 * for each element is returned.
 *
 * Note: This method *always* returns an array.  If no valid value can be determined the
 *    array will be empty, otherwise it will contain one or more values.
 */
$.fn.fieldValue = function(successful) {
    for (var val=[], i=0, max=this.length; i < max; i++) {
        var el = this[i];
        var v = $.fieldValue(el, successful);
        if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) {
            continue;
        }
        if (v.constructor == Array)
            $.merge(val, v);
        else
            val.push(v);
    }
    return val;
};

/**
 * Returns the value of the field element.
 */
$.fieldValue = function(el, successful) {
    var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
    if (successful === undefined) {
        successful = true;
    }

    if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
        (t == 'checkbox' || t == 'radio') && !el.checked ||
        (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
        tag == 'select' && el.selectedIndex == -1)) {
            return null;
    }

    if (tag == 'select') {
        var index = el.selectedIndex;
        if (index < 0) {
            return null;
        }
        var a = [], ops = el.options;
        var one = (t == 'select-one');
        var max = (one ? index+1 : ops.length);
        for(var i=(one ? index : 0); i < max; i++) {
            var op = ops[i];
            if (op.selected) {
                var v = op.value;
                if (!v) { // extra pain for IE...
                    v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text : op.value;
                }
                if (one) {
                    return v;
                }
                a.push(v);
            }
        }
        return a;
    }
    return $(el).val();
};

/**
 * Clears the form data.  Takes the following actions on the form's input fields:
 *  - input text fields will have their 'value' property set to the empty string
 *  - select elements will have their 'selectedIndex' property set to -1
 *  - checkbox and radio inputs will have their 'checked' property set to false
 *  - inputs of type submit, button, reset, and hidden will *not* be effected
 *  - button elements will *not* be effected
 */
$.fn.clearForm = function(includeHidden) {
    return this.each(function() {
        $('input,select,textarea', this).clearFields(includeHidden);
    });
};

/**
 * Clears the selected form elements.
 */
$.fn.clearFields = $.fn.clearInputs = function(includeHidden) {
    var re = /^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i; // 'hidden' is not in this list
    return this.each(function() {
        var t = this.type, tag = this.tagName.toLowerCase();
        if (re.test(t) || tag == 'textarea') {
            this.value = '';
        }
        else if (t == 'checkbox' || t == 'radio') {
            this.checked = false;
        }
        else if (tag == 'select') {
            this.selectedIndex = -1;
        }
		else if (t == "file") {
			if (/MSIE/.test(navigator.userAgent)) {
				$(this).replaceWith($(this).clone(true));
			} else {
				$(this).val('');
			}
		}
        else if (includeHidden) {
            // includeHidden can be the value true, or it can be a selector string
            // indicating a special test; for example:
            //  $('#myForm').clearForm('.special:hidden')
            // the above would clean hidden inputs that have the class of 'special'
            if ( (includeHidden === true && /hidden/.test(t)) ||
                 (typeof includeHidden == 'string' && $(this).is(includeHidden)) )
                this.value = '';
        }
    });
};

/**
 * Resets the form data.  Causes all form elements to be reset to their original value.
 */
$.fn.resetForm = function() {
    return this.each(function() {
        // guard against an input with the name of 'reset'
        // note that IE reports the reset function as an 'object'
        if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) {
            this.reset();
        }
    });
};

/**
 * Enables or disables any matching elements.
 */
$.fn.enable = function(b) {
    if (b === undefined) {
        b = true;
    }
    return this.each(function() {
        this.disabled = !b;
    });
};

/**
 * Checks/unchecks any matching checkboxes or radio buttons and
 * selects/deselects and matching option elements.
 */
$.fn.selected = function(select) {
    if (select === undefined) {
        select = true;
    }
    return this.each(function() {
        var t = this.type;
        if (t == 'checkbox' || t == 'radio') {
            this.checked = select;
        }
        else if (this.tagName.toLowerCase() == 'option') {
            var $sel = $(this).parent('select');
            if (select && $sel[0] && $sel[0].type == 'select-one') {
                // deselect all other options
                $sel.find('option').selected(false);
            }
            this.selected = select;
        }
    });
};

// expose debug var
$.fn.ajaxSubmit.debug = false;

// helper fn for console logging
function log() {
    if (!$.fn.ajaxSubmit.debug)
        return;
    var msg = '[jquery.form] ' + Array.prototype.join.call(arguments,'');
    if (window.console && window.console.log) {
        window.console.log(msg);
    }
    else if (window.opera && window.opera.postError) {
        window.opera.postError(msg);
    }
}

}));


/*!common/components/dialog/main.js*/
;define('common/components/dialog/main', ['require', 'exports', 'module', 'dep/jquery-colorbox/jquery.colorbox'], function(require, exports, module) {

  /**
   * @require "common/components/dialog/main.css"
  **/
  require('dep/jquery-colorbox/jquery.colorbox');
  
  var defaultOpt = {
      body: '',
      loading: false,
      okBtn: {
          has: false,
          text: '确认',
          onClick: function() {
              $.colorbox.close();
          }
      },
      cancelBtn: {
          has: false,
          text: '取消',
          onClick: function() {
              $.colorbox.close();
          }
      }
  }
  
  module.exports = function(opt) {
      opt = $.extend(true, {}, defaultOpt, opt);
  
      var innerHtml;
      if (!opt.html) {
          var bodyHtml = opt.body ? '<div class="dialog_body">' + opt.body + '</div>' : '';
          var loadingHtml = opt.loading ? '<div class="dialog_loading"></div>' : '';
          var okBtnHtml = opt.okBtn && opt.okBtn.has && opt.okBtn.text ? '<button class="dialog_btn dialog_ok" type="button">' + opt.okBtn.text + '</button>' : '';
          var cancelBtnHtml = opt.cancelBtn && opt.cancelBtn.has && opt.cancelBtn.text ? '<button class="dialog_btn dialog_cancel" type="button">' + opt.cancelBtn.text + '</button>' : '';
          var innerHtml = bodyHtml + loadingHtml + okBtnHtml + cancelBtnHtml;
          if (innerHtml !== '') {
              opt.html = '<div class="dialog_container">' + innerHtml + '</div>';
          }
      }
  
      if (opt.loading) {
          opt.overlayClose = false;
          opt.closeButton = false;
      }
  
      $.colorbox(opt);
  
      if (innerHtml != '') {
          if (opt.okBtn && opt.okBtn.has && opt.okBtn.onClick) {
              $('#cboxContent .dialog_ok').click(opt.okBtn.onClick);
          }
          if (opt.cancelBtn && opt.cancelBtn.has && opt.cancelBtn.onClick) {
              $('#cboxContent .dialog_cancel').click(opt.cancelBtn.onClick);
          }
      }
  }
  
  

});
/*!common/components/imgcutter/main.js*/
;define('common/components/imgcutter/main', ['require', 'exports', 'module', 'dep/jquery.imgcutter/dist/jquery.imgcutter', 'dep/jquery-form/jquery.form', 'common/components/dialog/main'], function(require, exports, module) {

  /*
  example:
  
  imgcutter({
      inputFile: 'input[type=file]',
      upload: {
          url: config.url.uploadAndcutPic,
          data: {},
          success: function(result) {
              // todo
          },
  
          previewrWidth: 300,  // 预览区域宽度，默认值300
          previewrHeight: 300, // 预览区域高度，默认值300
          selectorWidth: 250,  // 选择去域宽度，默认值250
          selectorHeight: 250  // 选择去域高度，默认值250
      }
  });
  // 其他参数继承自jquery.imgcutter.js，可以参考https://github.com/vicerwang/jquery.imgcutter
  
  */
  
  /**
   * @require "dep/jquery.imgcutter/dist/jquery.imgcutter.css"
   * @require "common/components/imgcutter/main.less"
   **/
  require('dep/jquery.imgcutter/dist/jquery.imgcutter');
  require('dep/jquery-form/jquery.form');
  var dialog = require('common/components/dialog/main');
  
  module.exports = function(opts) {
      var $inputFile;
      if (!opts.inputFile) {
          return;
      }
      if (opts.inputFile instanceof jQuery) {
          $inputFile = opts.inputFile;
      } else {
          $inputFile = $(opts.inputFile);
      }
      $inputFile.length && init();
  
      function init() {
          var $dialogWrap = $('#cutterDialogWrap');
          $dialogWrap.length > 0 && $dialogWrap.remove();
          $('body').append([
              '<div id="cutterDialogWrap" style="display:none;">',
                  '<div id="cutterDialog">',
                      '<div id="cutterContainer"></div>',
                      '<button class="cutter_btn" id="cutter_ok" type="button">确定</button>',
                      '<button class="cutter_btn" id="cutter_cancel" type="button">取消</button>',
                  '</div>',
              '</div>'
          ].join(''));
          $dialog = $('#cutterDialog');
          initEvent();
  
          var defaults = {
              previewrWidth: 300,
              previewrHeight: 300,
              selectorWidth: 250,
              selectorHeight: 250
          };
  
          var params = {
              container: '#cutterContainer',
              beforePreview: function(e, extension) {
                  if ($.inArray(extension.toLowerCase(), ['jpg', 'jpeg', 'gif', 'png']) === -1) {
                      showError('支持jpg、jpeg、gif、png格式的图片文件');
                      clearInputFileValue();
                      return false;
                  }
  
                  dialog({
                      title: '选择裁剪区域',
                      inline: true,
                      href: '#cutterDialog',
                      opacity: 0.4,
                      onClosed: function() {
                          clearInputFileValue();
                          $('#cutter_ok').removeProp('disabled').text('确定');
                      }
                  });
                  return true;
              }
          };
          params = $.extend({}, defaults, opts, params);
          $dialog.css('width', params.previewrWidth);
          $inputFile.imgcutter(params);
      }
  
      function initEvent() {
          $('#cutter_ok').on('click.imgcutter', function() {
              opts.upload && upload();
  
          });
          $('#cutter_cancel').on('click.imgcutter', function() {
              $.colorbox.close();
          });
      }
  
      function upload() {
          $('#cutter_ok').prop('disabled', 'disabled').text('剪裁中...');
  
          $inputFile = $($inputFile.selector);
          var cutInfo = $inputFile.imgcutter('getCutInfo');
          var data = $.extend({
                  viewPortW: cutInfo.previewrWidth,
                  viewPortH: cutInfo.previewrHeight,
                  selectorW: cutInfo.selectorWidth,
                  selectorH: cutInfo.selectorHeight,
                  selectorX: (cutInfo.previewrWidth - cutInfo.selectorWidth) / 2,
                  selectorY: (cutInfo.previewrHeight - cutInfo.selectorHeight) / 2,
                  imageW: cutInfo.currentWidth,
                  imageH: cutInfo.currentHeight,
                  imageX: (cutInfo.previewrWidth - cutInfo.selectorWidth) / 2 - cutInfo.selectorX,
                  imageY: (cutInfo.previewrHeight - cutInfo.selectorHeight) / 2 - cutInfo.selectorY
              }, opts.upload.data);
  
          $inputFile.wrap('<form enctype="multipart/form-data"></form>');
          $inputFile.parent().ajaxSubmit({
              url: opts.upload.url,
              type: 'post',
              data: data,
              dataType: 'text',
              success: function(resultStr) {
                  var result = JSON.parse(resultStr);
                  if (result.state === 1) {
                      opts.upload.success && opts.upload.success(result);
                      $.colorbox.close();
                  } else if (result.state === 220 || result.state === 221) {
                      clearInputFileValue();
                      showError('支持小于10M的jpg、jpeg、gif、png格式的图片文件');
                  } else {
                      clearInputFileValue();
                      showError('上传失败，请重新上传或者联系拉勾网');
                  }
              },
              error: function() {
                  showError('上传失败，请重新上传或联系拉勾网');
              },
              complete: function() {
                  $inputFile.unwrap();
                  $('#cutter_ok').removeProp('disabled').text('确定');
              }
          });
      }
  
      function clearInputFileValue() {
          $inputFile.wrap('<form></form>');
          $inputFile.parent()[0].reset();
          $inputFile.unwrap();
      }
  
      function showError(message) {
          dialog({
              width: 500,
              title: '错误提示',
              body: '<div id="cutterError"><i></i>' + message + '</div>',
              okBtn: {
                  has: true
              }
          });
      }
  }
  

});
/*!community/modules/common/new-question-btn/main.js*/
;/**
 * 问答社区-提个问题按钮
 * 在要添加提问弹窗的标签上添加类名 new_question_btn 即可使用
 * 如需添加默认话题在标签上添加自定义属性 data-topic-id="topicId" data-topic-name="name" [data-is-company-topic="1"]
 * data-topic-id="topicId"
 * （目前暂无话题、问题查询接口，所以现在data-topic-id和data-topic-name都需要设置,如果是公司话题的话要设置data-is-company-topic）
 * @param data-topic-id [话题ID]
 * @param data-topic-name [话题名]
 * @param [data-is-company-topic] [是否是公司话题,如果是值为1]
 * 
 * @author fridayhu@lagou.com
 *
 * jquery-colorbox
 * @require "common/components/jquery-colorbox-custom/jquery-colorbox.css"
 *
 * @require "community/modules/common/new-question-btn/main.less"
 * 
 */

define('community/modules/common/new-question-btn/main', ['require', 'exports', 'module', 'dep/jquery-colorbox/jquery.colorbox', 'community/modules/common/main', 'dep/artTemplate/dist/template'], function(require, exports, module) {

	require('dep/jquery-colorbox/jquery.colorbox');
	var config = require('community/modules/common/main').config,
		helper = require('community/modules/common/main').helper;
	var template = require('dep/artTemplate/dist/template');
	// 默认设置
	var defaultSettings = {
		maxTopicsNum: 3
	};

	// 初始化
	(function init() {
		$('#newQuestionPopupWrap').size() < 1 && $('body').append('<div class="new_question_popup_wrap" id="newQuestionPopupWrap"></div>');

		// 绑定弹窗
		$('body').on('click', '.new_question_btn', function(e) {
			if (!helper.checkUserStatus()) {
				return;
			}

			$this = $(this);

			// 弹窗
			if ($('#newQuestionPopupBox').size() > 0) {
				resetPopup();
				questionPopup();
				return;
			} else {

				// 获取向谁提问数据并初始化弹窗
				var targetDataReady = false,
					targetList = [];

				helper.ajax({
					url: config.url.getAskToList
				}).done(function(data) {
					if (data.state == 1 && data.content.data) {
						targetList = data.content.data.askToList;
					} else {
						console.log(data.message);
					}
				}).fail(function() {
					console.log('getAskToList error');
				}).always(function() {
					// 初始化弹窗
					initPopup({
						defaultTopicId: $this.attr('data-topic-id'),
						defaultTopicName: $this.attr('data-topic-name'),
						defaultIsCompanyTopic: $this.attr('data-is-company-topic'),
						targetList: targetList
					});
					targetDataReady = true;
				});
			}

		});

	})();


	// 弹窗
	function questionPopup() {
		$.colorbox({
			inline: true,
			href: $('#newQuestionPopupBox'),
			title: '提个问题',
			close: '<a class="popupTjPlaceholder" data-lg-tj-id="1na0" data-lg-tj-no="idnull" data-lg-tj-cid="idnull">close</a>'
				/*,
				onComplete: function() {
					$('#cboxLoadedContent, #cboxContent, #cboxWrapper, #colorbox').css('overflow', 'visible');
				}*/
		});

	}

	// 重置弹窗
	function resetPopup() {
		$('#newQuestionPopupBox .topic_selected_list').empty();
		addTopicSelected(defaultSettings.defaultTopicId, defaultSettings.defaultTopicName, defaultSettings.defaultIsCompanyTopic);
		updateTopicSelected();
		hideAutoCompleteQuestion();
		hideAutoCompleteTopic();
		$('#newQuestionForm').get(0).reset();
		autoFillLocalStorage();
		updatePlaceholder();
		submitCheck();

	}

	// 初始化弹窗
	var initPopupComplete = false;

	function initPopup(config) {
		if (initPopupComplete) {
			return;
		}
		initPopupComplete = true;

		var targetList = config.targetList;

		// 添加弹窗结构
		var tpl = "<div class=\"new_question_popup_box\" id=\"newQuestionPopupBox\">\n    <form id=\"newQuestionForm\" action=\"$!{FE_zbase}/user/saveInfo.json\" method=\"post\">\n        <dl class=\"form_list clearfix\">\n            <dt class=\"label_title\"><label for=\"newQuestioninputTitle\"><i>*</i>问题</label></dt>\n            <dd class=\"new_question_title\">\n                <div class=\"input_box\">\n                    <input type=\"text\" id=\"newQuestioninputTitle\" name=\"title\" placeholder=\"请一句话描述问题，并以问号结尾\" autocomplete=\"off\" maxlength=\"50\" data-maxlength=\"50\" />\n                </div>\n                <div class=\"question_autoComplete_box\">\n                    <div class=\"question_autoComplete_list\">\n                        <ul></ul>\n                    </div>\n                </div>\n            </dd>\n            <dt class=\"label_content\"><label for=\"newQuestioninputContent\">问题补充</label></dt>\n            <dd class=\"new_question_content\">\n                <div class=\"input_box\">\n                    <textarea id=\"newQuestioninputContent\" name=\"content\" placeholder=\"请详细介绍问题，认真的提问才能带来专业的回答哦 建议补充以下信息： 1、问题发生的背景 2、最大的困扰是什么 3、问题相关数据是什么\" maxlength=\"500\" data-maxlength=\"500\"></textarea>\n                    <div class=\"input_placeholder\">\n                        请详细介绍问题，认真的提问才能带来专业的回答哦<br />\n                        建议补充以下信息：<br />\n                        1、问题发生的背景<br />\n                        2、最大的困扰是什么<br />\n                        3、问题相关数据是什么\n                    </div>\n                </div>\n            </dd>\n            <dt class=\"label_belongTopicIds\">\n                <label for=\"newQuestionTopicSearch\"><i>*</i>所属话题</label>\n                <br />\n                <span>（<em class=\"topic_selected_num\">{{selectedTopicsNum}}</em>/<em class=\"topic_selectable_num\">{{maxTopicsNum}}</em>）</span>\n            </dt>\n            <dd class=\"new_question_belongTopicIds\">\n                <div class=\"input_box\">\n                    <ul class=\"topic_selected_list fl\"></ul>\n                    <div class=\"topic_search\">\n                        <input type=\"text\" id=\"newQuestionTopicSearch\" placeholder=\"搜索已有话题\" autocomplete=\"off\" maxlength=\"50\" />\n                    </div>\n                </div>\n                <p class=\"tips\">给问题添加话题有助于更快获得解答</p>\n                <div class=\"topic_autoComplete_box\">\n                    <div class=\"topic_autoComplete_list\">\n                        <ul></ul>\n                    </div>\n                    <a class=\"topic_autoComplete_new_btn\" href=\"javascript:;\" data-lg-tj-id=\"1gn0\" data-lg-tj-no=\"idnull\" data-lg-tj-cid=\"idnull\"><i>+</i>创建该话题</a>\n                </div>\n            </dd>\n            {{if targetList.length > 0}}\n            <dt class=\"label_askToIds\"><label for=\"\">向谁提问</label></dt>\n            <dd class=\"new_question_askToIds\">\n                <ul class=\"target_list\">\n                    {{each targetList as item index}}\n                        <li><input type=\"checkbox\" id=\"targetListAskToIds{{item.id}}\" name=\"askToIds\" value=\"{{item.id}}\"><label for=\"targetListAskToIds{{item.id}}\">{{item.name}}</label></li>\n                    {{/each}}\n                </ul>\n            </dd>\n            {{/if}}\n        </dl>\n        <div class=\"new_question_toolbar\">\n            <a class=\"btn new_question_submit\" id=\"newQuestionSubmit\" href=\"javascript:;\" data-lg-tj-id=\"1c10\" data-lg-tj-no=\"idnull\" data-lg-tj-cid=\"idnull\">发布问题</a>\n            <input type=\"checkbox\" class=\"new_question_enable_anonymous magic-checkbox\" id=\"newQuestionEnableAnonymous\" name=\"anonymous\" />\n            <label for=\"newQuestionEnableAnonymous\" data-lg-tj-id=\"1c20\" data-lg-tj-no=\"idnull\" data-lg-tj-cid=\"idnull\">匿名提问</label>\n            <input type=\"hidden\" id=\"newQuestionSource\" name=\"source\" value=\"PC\">\n        </div>\n    </form>\n</div>\n";
		var htmlStr = template.compile(tpl)({
			targetList: targetList,
			selectedTopicsNum: 0,
			maxTopicsNum: defaultSettings.maxTopicsNum,
			FE_zbase: GLOBAL_DOMAIN.zctx,
			FE_lgsbase: GLOBAL_DOMAIN.lgsctx,
			cdndomain: window.GLOBAL_CDN_DOMAIN
		});
		$('#newQuestionPopupWrap').append(htmlStr);

		// newQuestioninputContent placeholder换行
		// $('#newQuestioninputContent').prop('placeholder', '请详细介绍问题，认真的提问才能带来专业的回答哦\n建议补充以下信息：\n1、问题发生的背景\n2、最大的困扰是什么\n3、问题相关数据是什么');

		// 添加输入框的focus、blur效果
		$('#newQuestionPopupBox .input_box').on('focus', 'input, textarea', function(e) {
			$(this).closest('.input_box').addClass('focus');
		});
		$('#newQuestionPopupBox .input_box').on('blur', 'input, textarea', function(e) {
			$(this).closest('.input_box').removeClass('focus');
		});
		$('#newQuestionPopupBox').on('click', '.new_question_belongTopicIds .topic_selected_list', function(e) {
			// 此处按精确位置绑定事件，防止因为input_box内部子元素事件穿透误触发，e.isTrigger??
			$('#newQuestionTopicSearch').focus();
		});
		// 删除话题标签事件绑定
		$('#newQuestionPopupBox .topic_selected_list').on('click', 'li i', function(e) {
			deleteTopicSelected($(this).siblings('input[name=belongTopicIds]').val(), function() {
				$('#newQuestionTopicSearch').focus();
				hideAutoCompleteTopic();
			});
			e.stopPropagation();
		});
		// 添加话题标签事件绑定
		$('#newQuestionPopupBox .topic_autoComplete_list').on('click', 'li', function(e) {
			addTopicSelected($(this).attr('data-topic-id'), $(this).attr('data-topic-name'), $(this).attr('data-is-company-topic'), function() {
				$('#newQuestionTopicSearch').focus();
				hideAutoCompleteTopic();
			});
			e.stopPropagation();
		});
		// 创建话题事件绑定
		$('#newQuestionPopupBox .topic_autoComplete_box').on('click', '.topic_autoComplete_new_btn', function(e) {
			createTopic($('#newQuestionTopicSearch').val(), false, function() {
				$('#newQuestionTopicSearch').focus();
				hideAutoCompleteTopic();
			});
			e.stopPropagation();
		});
		// 点击外部隐藏搜索提示框
		$('#newQuestionPopupBox').on('click', function(e) {
			hideAutoCompleteQuestion();
			hideAutoCompleteTopic();
		});
		$('#newQuestionPopupBox').on('click', '.label_title label, .new_question_title', function(e) {
			hideAutoCompleteTopic();
			e.stopPropagation();
		});
		$('#newQuestionPopupBox').on('click', '.label_belongTopicIds label, .new_question_belongTopicIds', function(e) {
			hideAutoCompleteQuestion();
			e.stopPropagation();
		});

		// 本地保存延迟 时间单位ms
		var autoSaveLocalDelay = 200;
		lastAutoSaveLocal = 0;

		// 搜索提示延迟 时间单位ms
		var autoCompleteDelay = 200,
			autoCompleteOnFocusDelay = 2000,
			// 最后一次搜索输入的时间戳 
			lastAutoComplete = 0;

		// 搜索问题 && 本地保存
		$('#newQuestioninputTitle').on('keyup', function(e) {
			e.which == 38 && prevAutoQuestion();
			e.which == 40 && nextAutoQuestion();
			e.which == 13 && enterAutoQuestion();
			// 不改变输入的按键
			if (e.which == 13 || e.which >= 37 && e.which <= 40) {
				return;
			}

			// console.log(e.timeStamp);
			// 记录最后一次keyup事件时间
			lastAutoComplete = e.timeStamp;
			setTimeout(function() {
				// 如果延时设定内没有再次发生keyup事件
				if (lastAutoComplete - e.timeStamp == 0) {
					var questionTitle = $('#newQuestioninputTitle').val();
					autoCompleteQuestion(questionTitle);
				}
			}, autoCompleteDelay);
			// 记录最后一次keyup事件时间
			lastAutoSaveLocal = e.timeStamp;
			setTimeout(function() {
				// 如果延时设定内没有再次发生keyup事件
				if (lastAutoSaveLocal - e.timeStamp == 0) {
					var questionTitle = $('#newQuestioninputTitle').val() || '';
					try {
						window.localStorage && (function() {
							localStorage.autoSaveQuestionTitle = questionTitle
						})();
					} catch (err) {
						console.log('auto save questionTitle fail');
					}
				}
			}, autoSaveLocalDelay);

		});
		$('#newQuestioninputTitle').on('focus', function(e) {
			// console.log(e.timeStamp - lastAutoComplete);
			if (e.timeStamp - lastAutoComplete > autoCompleteOnFocusDelay) {
				lastAutoComplete = e.timeStamp;
				var questionTitle = $('#newQuestioninputTitle').val();
				autoCompleteQuestion(questionTitle);
			}
		});

		// 问题补充本地保存
		$('#newQuestioninputContent').on('keyup', function(e) {
			// 不改变输入的按键
			if (e.which == 13 || e.which >= 37 && e.which <= 40) {
				return;
			}

			// 记录最后一次keyup事件时间
			lastAutoSaveLocal = e.timeStamp;
			setTimeout(function() {
				// 如果延时设定内没有再次发生keyup事件
				if (lastAutoSaveLocal - e.timeStamp == 0) {
					var questionContent = $('#newQuestioninputContent').val() || '';
					try {
						window.localStorage && (function() {
							localStorage.autoSaveQuestionContent = questionContent
						})();
					} catch (err) {
						console.log('auto save questionContent fail');
					}
				}
			}, autoSaveLocalDelay);

		});
		// 搜索话题
		$('#newQuestionTopicSearch').on('keyup', function(e) {
			e.which == 38 && prevAutoTopic();
			e.which == 40 && nextAutoTopic();
			e.which == 13 && enterAutoTopic();
			// 不改变输入的按键
			if (e.which == 13 || e.which >= 37 && e.which <= 40) {
				return;
			}

			// console.log(e.timeStamp);
			// 记录最后一次keyup事件时间
			lastAutoComplete = e.timeStamp;
			setTimeout(function() {
				// 如果延时设定内没有再次发生keyup事件
				if (lastAutoComplete - e.timeStamp == 0) {
					var topicTitle = $('#newQuestionTopicSearch').val();
					autoCompleteTopic(topicTitle);
				}
			}, autoCompleteDelay);

		});
		$('#newQuestionTopicSearch').on('keydown', function(e) {
			e.which == 8 && backSpaceAutoTopic();
		});
		$('#newQuestionTopicSearch').on('focus', function(e) {
			// console.log(e.timeStamp - lastAutoComplete);
			if (e.timeStamp - lastAutoComplete > autoCompleteOnFocusDelay) {
				lastAutoComplete = e.timeStamp;
				var topicTitle = $('#newQuestionTopicSearch').val();
				autoCompleteTopic(topicTitle);
			}
		});

		// 提问验证绑定 && 问题、问题补充字数控制
		//$('#newQuestioninputTitle, #newQuestioninputContent').on('keydown', function(e) {
		//	var thisValue = $(this).val(),
		//		trimValue = $.trim(thisValue),
		//		subLength = $(this).attr('data-maxlength') - 0;
		//	var exceptKeyCodeArrs = [27, 8, 9, 20, 16, 17, 18, 91, 93, 45, 46, 144, 229];
		//	// F1-F12、Page Up、Page Down、End、Home、方向键及其他功能键（去除回车、空格）、输入法
		//	if ($.trim(thisValue).length >= subLength && !(e.which >= 112 && e.which <= 123 || e.which >= 33 && e.which <= 40) && $.inArray(e.which, exceptKeyCodeArrs) == -1 && $.trim(window.getSelection()).length < 1) {
		//		e.preventDefault();
		//		$(this).val(thisValue.replace(trimValue, trimValue.substring(0, subLength)));
		//	}
		//});
		var IMELock = false;
		// compositionstart、compositionend 输入法开始、结束
		// $('#editNickname, #editPositionName, #editIntroduce').on('compositionstart', function(e) {
		// 	IMELock = true;
		// });
		// $('#editNickname, #editPositionName, #editIntroduce').on('compositionend', function(e) {
		// 	IMELock = false;
		// });
		$('#newQuestioninputTitle, #newQuestioninputContent').on('input', function(e) {
			// var thisValue = $(this).val(),
			// 	trimValue = $.trim(thisValue),
			// 	subLength = $(this).attr('data-maxlength') - 0;
			// if (trimValue.length > subLength && !IMELock) {
			// 	$(this).val(thisValue.replace(trimValue, trimValue.substring(0, subLength)));
			// }
			submitCheck();
		});
		$('#newQuestioninputTitle, #newQuestioninputContent').on('change', function(e) {
			$(this).val($.trim($(this).val()));
			submitCheck();
		});
		$('#newQuestionPopupBox').on('click', '.target_list input[type=checkbox]', function(e) {
			submitCheck();
		});
		// 发布问题按钮绑定
		$('#newQuestionPopupBox').on('click', '.new_question_submit', submitQuestion);
		questionPopup();

		// 初始化Placeholder
		var $placeholders = $('#newQuestionPopupBox .input_box input + .input_placeholder, #newQuestionPopupBox .input_box textarea + .input_placeholder');
		$placeholders.length > 0 && $placeholders.each(function(index, el) {
			$(el).siblings('input, textarea').prop('placeholder') && $(el).show().siblings('input, textarea').prop('placeholder', '');
		});
		$placeholders.on('click', function(e) {
			e.preventDefault();
			$(this).siblings('input, textarea').focus();
		});
		$placeholders.siblings('input, textarea').on('keyup', function(e) {
			// 不改变输入的按键
			if (e.which == 13 || e.which >= 37 && e.which <= 40) {
				return;
			}
			updatePlaceholder();
		});

		// 设置默认值
		defaultSettings.defaultTopicId = config.defaultTopicId;
		defaultSettings.defaultTopicName = config.defaultTopicName;
		defaultSettings.defaultIsCompanyTopic = config.defaultIsCompanyTopic;
		addTopicSelected(defaultSettings.defaultTopicId, defaultSettings.defaultTopicName, defaultSettings.defaultIsCompanyTopic);
		autoFillLocalStorage();
		updatePlaceholder();
		submitCheck();

	}

	// 替代默认Placeholder
	function updatePlaceholder() {
		var $placeholders = $('#newQuestionPopupBox .input_box input + .input_placeholder, #newQuestionPopupBox .input_box textarea + .input_placeholder');
		$placeholders.length > 0 && $placeholders.length > 0 && $placeholders.each(function(index, el) {
			$(el).siblings('input, textarea').val() ? $(el).hide() : $(el).show();
		});

	}

	// 本地保存自动填充
	function autoFillLocalStorage() {
		var fillOk = false;
		try {
			window.localStorage ? (function() {
				localStorage.autoSaveQuestionTitle && $('#newQuestioninputTitle').val(localStorage.autoSaveQuestionTitle);
				localStorage.autoSaveQuestionContent && $('#newQuestioninputContent').val(localStorage.autoSaveQuestionContent);
				fillOk = true;
			})() : (function() {
				fillOk = false;
			})();
		} catch (err) {
			console.log('auto fill local storage fail');
			fillOk = false;
		}
		return fillOk;
	}

	// 本地保存清除
	function clearLocalStorage() {
		var claerOk = false;
		try {
			window.localStorage ? (function() {
				localStorage.removeItem('autoSaveQuestionTitle');
				localStorage.removeItem('autoSaveQuestionContent');
				claerOk = true;
			})() : (function() {
				claerOk = false;
			})();
		} catch (err) {
			console.log('claer local storage fail');
			claerOk = false;
		}
		return claerOk;
	}

	// 问题搜索 AutoComplete
	var isAutoCompletingQuestion = false;

	function autoCompleteQuestion(questionTitle) {
		if (!$.trim(questionTitle)) {
			hideAutoCompleteQuestion();
			return;
		}

		if (isAutoCompletingQuestion) {
			return;
		}

		isAutoCompletingQuestion = true;
		helper.ajax({
			url: config.url.searchQuestion,
			data: {
				title: questionTitle,
				pageNum: 1,
				pageSize: 4
			}
		}).done(function(data) {
			if (data.state == 1 && data.content.data) {
				if (data.content.data.resultPage.result.length > 0) {
					var tpl = "{{each questionAutoCompleteList as item index}}\n\t{{if index < pageSize}}\n    <li data-lg-tj-id=\"1V10\" data-lg-tj-no=\"idnull\" data-lg-tj-cid=\"{{item.id}}\"><a href=\"{{FE_zbase}}/question/{{item.id}}.html\" target=\"_blank\"\"><strong class=\"question_name\">{{item.titile}}</strong><span class=\"answer_num\">已有<em>{{item.answerCount}}</em>个回答</span></a></li>\n    {{/if}}\n{{/each}}\n\t\n";
					var htmlStr = template.compile(tpl)({
						questionAutoCompleteList: data.content.data.resultPage.result,
						pageNum: 1,
						pageSize: 4,
						FE_zbase: GLOBAL_DOMAIN.zctx,
						FE_lgsbase: GLOBAL_DOMAIN.lgsctx,
						cdndomain: window.GLOBAL_CDN_DOMAIN
					});
					$('#newQuestionPopupBox .question_autoComplete_list ul').empty().append(htmlStr);
					$('#newQuestionPopupBox .question_autoComplete_box').show();
					$('#newQuestionPopupBox .question_autoComplete_list li').removeClass('active');
					$('#newQuestionPopupBox .question_autoComplete_list').scrollTop(0);
					// 使弹窗可溢出colorbox
					$('#cboxLoadedContent, #cboxContent, #cboxWrapper, #colorbox').css('overflow', 'visible');
				} else {
					$('#newQuestionPopupBox .question_autoComplete_box').hide();
				}
			} else {
				console.log(data.message);
			}
		}).fail(function() {
			console.log('searchQuestion error');
		}).always(function() {
			isAutoCompletingQuestion = false;
		});

	}

	// 隐藏 问题AutoComplete
	function hideAutoCompleteQuestion() {
		$('#newQuestionPopupBox .question_autoComplete_box').hide();

	}
	// 重置 问题AutoComplete
	function resetAutoCompleteQuestion() {
		$('#newQuestionPopupBox .question_autoComplete_box ul').empty();

	}

	// 回车跳转问题页
	function enterAutoQuestion() {
		var $questionAutoCompleteList = $('#newQuestionPopupBox .question_autoComplete_list:visible');
		if ($questionAutoCompleteList.size() < 1 || $questionAutoCompleteList.find('li.active').size() < 1) {
			return;
		}
		var $curAutoQuestion = $questionAutoCompleteList.find('li.active').first();
		window.open($curAutoQuestion.find('a').prop('href'));
		hideAutoCompleteQuestion();

	}
	// 上按钮选择问题
	function prevAutoQuestion() {
		var $questionAutoCompleteList = $('#newQuestionPopupBox .question_autoComplete_list:visible');
		if ($questionAutoCompleteList.size() < 1) {
			return;
		}
		$questionAutoCompleteList.find('li.active').size() > 0 && $questionAutoCompleteList.find('li.active').removeClass('active').prev().addClass('active');
		$questionAutoCompleteList.find('li.active').size() < 1 && $questionAutoCompleteList.find('li').last().addClass('active');

	}
	// 下按钮选择问题
	function nextAutoQuestion() {
		var $questionAutoCompleteList = $('#newQuestionPopupBox .question_autoComplete_list:visible');
		if ($questionAutoCompleteList.size() < 1) {
			return;
		}
		$questionAutoCompleteList.find('li.active').size() > 0 && $questionAutoCompleteList.find('li.active').removeClass('active').next().addClass('active');
		$questionAutoCompleteList.find('li.active').size() < 1 && $questionAutoCompleteList.find('li').first().addClass('active');

	}

	// 添加已选话题标签
	var canSelected = true;
	// 话题id，话题名，isCompanyTopic是否公司个话题，handler添加成功回调
	function addTopicSelected(id, name, isCompanyTopic, handler) {
		if (typeof id === 'number') {
			var id = id + '';
		}
		if (typeof name === 'number') {
			var name = name + '';
		}

		// 后台可能会存有没有id的话题，但是话题名是唯一的（在搜索话题时候可能会出现，P.S.话题：公司--1对多）
		if (!id && name) {
			createTopic(name, true, handler);
			return;
		}

		if (!canSelected || !id || !name) {
			return;
		}

		if ($('#newQuestionPopupBox .topic_selected_list input[value=' + id + ']').size() > 0) {
			$('#newQuestionTopicSearch').val('');
			handler && handler();
			return;
		}

		var tpl = "<li><input type=\"checkbox\" name=\"belongTopicIds\" value=\"{{id}}\" {{if isCompanyTopic}} data-is-company-topic=\"1\" {{/if}} checked=\"checked\" /><em>{{name}}</em><i>删除话题</i></li>\n";
		var htmlStr = template.compile(tpl)({
			id: id,
			name: name,
			isCompanyTopic: isCompanyTopic,
			FE_zbase: GLOBAL_DOMAIN.zctx,
			FE_lgsbase: GLOBAL_DOMAIN.lgsctx,
			cdndomain: window.GLOBAL_CDN_DOMAIN
		});
		$('#newQuestionPopupBox .topic_selected_list').append(htmlStr);
		updateTopicSelected();
		$('#newQuestionTopicSearch').val('');
		handler && handler();

	}

	// 删除已选话题标签
	function deleteTopicSelected(id, handler) {
		$('#newQuestionPopupBox .topic_selected_list').find('input[value=' + id + ']').parent('li').remove();
		updateTopicSelected();
		handler && handler();

	}

	// 刷新已选话题数量、是否显示向谁提问
	var hasAskTo = false;

	function updateTopicSelected() {
		var selectedTopicsNum = $('#newQuestionPopupBox .topic_selected_list input[name=belongTopicIds]').size();
		$('#newQuestionPopupBox .label_belongTopicIds em.topic_selected_num').html(selectedTopicsNum);
		if (selectedTopicsNum >= defaultSettings.maxTopicsNum) {
			canSelected = false;
			$('#newQuestionTopicSearch').get(0).disabled = true;
			if ($('#newQuestionTopicSearch').siblings('.input_placeholder').size() > 0) {
				$('#newQuestionTopicSearch').siblings('.input_placeholder').hide();
			} else {
				$('#newQuestionTopicSearch').get(0).placeholder = '';
			}
		} else {
			canSelected = true;
			$('#newQuestionTopicSearch').get(0).disabled = false;
			if ($('#newQuestionTopicSearch').siblings('.input_placeholder').size() > 0) {
				$('#newQuestionTopicSearch').siblings('.input_placeholder').show();
			} else {
				$('#newQuestionTopicSearch').get(0).placeholder = '搜索已有话题';
			}
		}

		if ($('#newQuestionPopupBox .topic_selected_list input[name=belongTopicIds][data-is-company-topic]').size() > 0) {
			$('#newQuestionPopupBox .label_askToIds, #newQuestionPopupBox .new_question_askToIds').show();
			hasAskTo = true;
			$.colorbox.resize();
		} else {
			$('#newQuestionPopupBox .label_askToIds, #newQuestionPopupBox .new_question_askToIds').hide();
			hasAskTo = false;
			$.colorbox.resize();
		}
		submitCheck();

	}

	// 创建话题
	var isCreatingTopic = false;
	// topicTitle话题名，isAutoCompleteTopicTitle是否是搜索填充话题，handler添加成功回调
	function createTopic(topicTitle, isAutoCompleteTopicTitle, handler) {
		if (!$.trim(topicTitle)) {
			helper.alertTips('话题名称不能为空', questionPopup);
			return;
		}

		if (isCreatingTopic) {
			return;
		}

		isCreatingTopic = true;
		// 新创建话题和已存在话题都会返回话题的id
		helper.ajax({
			url: config.url.saveTopic,
			type: 'POST',
			data: {
				title: topicTitle
			}
		}).done(function(data) {
			if (data.state == 1 && data.content.data) {
				var topicId = data.content.data.topicId,
					topicTitle = data.content.data.title || topicTitle,
					isCompanyTopic = data.content.data.hasCompany ? '1' : undefined;
				addTopicSelected(topicId, topicTitle, isCompanyTopic, handler);
			} else if (data.state == 10000) {
				helper.alertTips('在社区内测期间，你还未获得发布内容的权限<br />但这不代表拉勾不爱你，<a href="http://form.mikecrm.com/a1GjwD" target="_blank">获得资格</a>');
			} else {
				helper.alertTips(data.message, questionPopup);
				console.log(data.message);
			}
		}).fail(function() {
			isAutoCompleteTopicTitle ? helper.alertTips('选择话题失败', questionPopup) : helper.alertTips('创建话题失败', questionPopup);
			console.log('saveTopic error');
		}).always(function() {
			isCreatingTopic = false;
		});

	}

	// 话题搜索提示 AutoComplete
	var isAutoCompletingtopic = false;

	function autoCompleteTopic(topicTitle) {
		if (!$.trim(topicTitle)) {
			hideAutoCompleteTopic();
			return;
		}

		if (isAutoCompletingtopic) {
			return;
		}

		isAutoCompletingtopic = true;
		helper.ajax({
			url: config.url.searchTopic,
			data: {
				title: topicTitle,
				pageNum: 1,
				pageSize: 100
			}
		}).done(function(data) {
			if (data.state == 1 && data.content.data) {

				var tpl = "{{each topicAutoCompleteList as item index}}\n    <li data-topic-id=\"{{item.id}}\" data-topic-name=\"{{item.title}}\" {{if item.hasCompany}} data-is-company-topic=\"1\" {{/if}} data-lg-tj-id=\"1go0\" data-lg-tj-no=\"idnull\" data-lg-tj-cid=\"{{item.id}}\">{{item.title}}</li>\n{{/each}}\n\t\n";
				var htmlStr = template.compile(tpl)({
					topicAutoCompleteList: data.content.data.topicPage.result,
					FE_zbase: GLOBAL_DOMAIN.zctx,
					FE_lgsbase: GLOBAL_DOMAIN.lgsctx,
					cdndomain: window.GLOBAL_CDN_DOMAIN
				});
				$('#newQuestionPopupBox .topic_autoComplete_list ul').empty().append(htmlStr);
				$('#newQuestionPopupBox .topic_autoComplete_box').show();
				$('#newQuestionPopupBox .topic_autoComplete_list li').removeClass('active').first().addClass('active');
				$('#newQuestionPopupBox .topic_autoComplete_list').scrollTop(0);
				// 使弹窗可溢出colorbox
				$('#cboxLoadedContent, #cboxContent, #cboxWrapper, #colorbox').css('overflow', 'visible');
			} else {
				console.log(data.message);
			}
		}).fail(function() {
			console.log('searchTopic error');
		}).always(function() {
			isAutoCompletingtopic = false;
		});

	}

	// 隐藏 话题AutoComplete
	function hideAutoCompleteTopic() {
		$('#newQuestionPopupBox .topic_autoComplete_box').hide();

	}
	// 重置 话题AutoComplete
	function resetAutoCompleteTopic() {
		$('#newQuestionPopupBox .topic_autoComplete_list ul').empty();

	}

	// 回删删除已选话题标签
	function backSpaceAutoTopic() {
		var $topicSelectedList = $('#newQuestionPopupBox .topic_selected_list');
		if ($.trim($('#newQuestionTopicSearch').val()) || $topicSelectedList.find('input[name=belongTopicIds]').size() < 1) {
			return;
		}
		deleteTopicSelected($topicSelectedList.find('input[name=belongTopicIds]').last().val());

	}
	// 回车添加已选话题标签
	function enterAutoTopic() {
		var $topicAutoCompleteList = $('#newQuestionPopupBox .topic_autoComplete_list:visible');
		if ($topicAutoCompleteList.size() < 1 || $topicAutoCompleteList.find('li.active').size() < 1) {
			return;
		}
		var $curAutoTopic = $topicAutoCompleteList.find('li.active').first();
		addTopicSelected($curAutoTopic.attr('data-topic-id'), $curAutoTopic.attr('data-topic-name'), $curAutoTopic.attr('data-is-company-topic'));
		hideAutoCompleteTopic();

	}
	// 上按钮选择话题
	function prevAutoTopic() {
		var $topicAutoCompleteList = $('#newQuestionPopupBox .topic_autoComplete_list:visible');
		if ($topicAutoCompleteList.size() < 1) {
			return;
		}
		$topicAutoCompleteList.find('li.active').size() > 0 && $topicAutoCompleteList.find('li.active').removeClass('active').prev().addClass('active');
		$topicAutoCompleteList.find('li.active').size() < 1 && $topicAutoCompleteList.find('li').last().addClass('active');

		var $curAutoTopic = $topicAutoCompleteList.find('li.active');
		var prevHeight = 0,
			curHeight = $curAutoTopic.height(),
			wrapHeight = $topicAutoCompleteList.height(),
			curPositinTop = $topicAutoCompleteList.find('li.active').position().top - 10;

		$curAutoTopic.prevAll().each(function(index, el) {
			prevHeight += $(el).height();
		});

		if (curPositinTop < 0) {
			$topicAutoCompleteList.stop(true).animate({
				scrollTop: prevHeight
			}, 300);
		} else if (curPositinTop > wrapHeight - curHeight) {
			$topicAutoCompleteList.stop(true).animate({
				scrollTop: prevHeight
			}, 300);
		}

	}
	// 下按钮选择话题
	function nextAutoTopic() {
		var $topicAutoCompleteList = $('#newQuestionPopupBox .topic_autoComplete_list:visible');
		if ($topicAutoCompleteList.size() < 1) {
			return;
		}
		$topicAutoCompleteList.find('li.active').size() > 0 && $topicAutoCompleteList.find('li.active').removeClass('active').next().addClass('active');
		$topicAutoCompleteList.find('li.active').size() < 1 && $topicAutoCompleteList.find('li').first().addClass('active');

		var $curAutoTopic = $topicAutoCompleteList.find('li.active');
		var prevHeight = 0,
			curHeight = $curAutoTopic.height(),
			wrapHeight = $topicAutoCompleteList.height(),
			curPositinTop = $topicAutoCompleteList.find('li.active').position().top - 10;

		$curAutoTopic.prevAll().each(function(index, el) {
			prevHeight += $(el).height();
		});

		if (curPositinTop > wrapHeight - curHeight) {
			$topicAutoCompleteList.stop(true).animate({
				scrollTop: prevHeight - wrapHeight + curHeight
			}, 300);
		} else if (curPositinTop < 0) {
			$topicAutoCompleteList.stop(true).animate({
				scrollTop: prevHeight - wrapHeight + curHeight
			}, 300);
		}

		/*if (prevHeight >= wrapHeight && (curPositinTop > wrapHeight - curHeight || curPositinTop <= 0)) {
			$topicAutoCompleteList.stop(true).animate({
				scrollTop: prevHeight - wrapHeight + curHeight
			}, 300);
		} else if (curPositinTop <= 0) {
			$topicAutoCompleteList.stop(true).animate({
				scrollTop: 0
			}, 300);
		}*/

	}

	// 提交验证
	function submitCheck() {
		// 问题验证
		if (!$.trim($('#newQuestioninputTitle').val())) {
			// helper.alertTips('问题不能为空', questionPopup);
			$('#newQuestionPopupBox .new_question_submit').addClass('btn_disable');
			return false;
		}
		if ($.trim($('#newQuestioninputTitle').val()) && $.trim($('#newQuestioninputTitle').val()).length > 50 && !IMELock) {
			// helper.alertTips('问题最大长度不能超过50个字符', questionPopup);
			$('#newQuestionPopupBox .new_question_submit').addClass('btn_disable');
			return false;
		}
		// 问题补充验证
		if ($.trim($('#newQuestioninputContent').val()) && $.trim($('#newQuestioninputContent').val()).length > 500 && !IMELock) {
			// helper.alertTips('问题补充最大长度不能超过500个字符', questionPopup);
			$('#newQuestionPopupBox .new_question_submit').addClass('btn_disable');
			return false;
		}
		// 所属话题验证
		if ($('#newQuestionPopupBox .topic_selected_list input[name=belongTopicIds]:checked').size() < 1) {
			// helper.alertTips('至少需要选择一个所属话题', questionPopup);
			$('#newQuestionPopupBox .new_question_submit').addClass('btn_disable');
			return false;
		}
		// 向谁提问验证
		/*if (hasAskTo && $('#newQuestionPopupBox .target_list input[name=askToIds]:checked').size() < 1) {
			// helper.alertTips('至少需要选择一个向谁提问', questionPopup);
			$('#newQuestionPopupBox .new_question_submit').addClass('btn_disable');
			return false;
		}*/

		$('#newQuestionPopupBox .new_question_submit').removeClass('btn_disable');
		return true;

	}

	// 提交问题
	var isSubmitingQuestion = false;

	function submitQuestion() {
		var title = $.trim($('#newQuestioninputTitle').val()),
			belongTopicIds = [];

		$('#newQuestionPopupBox .topic_selected_list input[name=belongTopicIds]:checked').each(function() {
			belongTopicIds.push($(this).val());
		});

		if (!submitCheck() || isSubmitingQuestion) {
			return;
		}
		var content = $.trim($('#newQuestioninputContent').val()),
			askToIds = [],
			anonymous = $('#newQuestionEnableAnonymous').get(0).checked,
			source = $('#newQuestionSource').val();

		$('#newQuestionPopupBox .target_list input[name=askToIds]:checked').each(function() {
			askToIds.push($(this).val());
		});

		isSubmitingQuestion = true;
		helper.ajax({
			url: config.url.addQuestion,
			type: 'POST',
			data: {
				title: title,
				belongTopicIds: belongTopicIds,
				content: content,
				askToIds: askToIds,
				anonymous: anonymous,
				source: source
			}
		}).done(function(data) {
			if (data.state == 1) {
				clearLocalStorage();
				window.location.href = GLOBAL_DOMAIN.zctx + '/question/' + data.content.data.questionId + '.html';
			} else if (data.state == 10000) {
				helper.alertTips('在社区内测期间，你还未获得发布内容的权限<br />但这不代表拉勾不爱你，<a href="http://form.mikecrm.com/a1GjwD" target="_blank">获得资格</a>');
			} else {
				helper.alertTips(data.message, questionPopup);
				console.log(data.message);
			}

		}).fail(function() {
			helper.alertTips('发布问题失败', questionPopup);
			console.log('addQuestion error');
		}).always(function() {
			isSubmitingQuestion = false;
		});

	}

});

/*!community/modules/common/user-card/main.js*/
;/**
 * 问答社区-用户卡片
 *
 * @author fridayhu@lagou.com
 *
 */
define('community/modules/common/user-card/main', ['require', 'exports', 'module', 'community/modules/common/main', 'common/components/imgcutter/main', 'community/modules/common/new-question-btn/main'], function(require, exports, module) {

	var config = require('community/modules/common/main').config,
		helper = require('community/modules/common/main').helper,
		imgcutter = require('common/components/imgcutter/main');

	// 未登录状态
	if ($('#userCardLogin').size() > 0) {
		var nowHour = new Date().getHours();
		if (nowHour >= 5 && nowHour < 9) {
			$('#userCardLogin .title span').html('早上好');
		} else if (nowHour >= 9 && nowHour < 11) {
			$('#userCardLogin .title span').html('上午好');
		} else if (nowHour >= 11 && nowHour < 13) {
			$('#userCardLogin .title span').html('中午好');
		} else if (nowHour >= 13 && nowHour < 19) {
			$('#userCardLogin .title span').html('下午好');
		} else {
			$('#userCardLogin .title span').html('晚上好');
		}
	}

	// 提个问题按钮
	if ($('#userCardNormal').size() > 0) {
		require('community/modules/common/new-question-btn/main');
	}

	// 编辑提示
	$('#userCardNormal .userinfo_edit_tips').size() > 0 && $('#userCardNormal .userinfo_edit_tips').on('click', '.edit_tips_close', function(e) {
		$('#userCardNormal .userinfo_edit_tips').remove();
	});

	// 初始化编辑
	(function initUserinfoEdit() {

		if (!($('#userCardEdit').size() > 0)) {
			return;
		}

		var originalAvatarImg = $('#userCardEditForm .avatar .avatar_img').prop('src'),
			originalAvatarValue = $('#userCardEditForm input[name=portrait]').val() || '';

		// 点击编辑
		// 编辑功能移动至account
		/*$('body').on('click', '.userinfo_edit', function(e) {

			$('#userCardNormal').hide();
			$('#userCardEdit').show();

			if ($('html').get(0).scrollTop > $("#userCardEdit").offset().top || $('body').get(0).scrollTop > $("#userCardEdit").offset().top) {
				$('html, body').animate({
					scrollTop: $("#userCardEdit").offset().top
				}, 500);
			}

			submitCheck() && userNameCheck(submitCheck);

		});*/

		// 头像裁剪上传
		imgcutter({
			inputFile: '#avatarUpload',
			upload: {
				url: config.url.uploadAndcutPic,
				success: function(data) {
					var imgUrl = data.content.data.cutPicUrl;
					$('#userCardEditForm .avatar .avatar_img').prop('src', GLOBAL_DOMAIN.lgsctx + '/' + imgUrl);
					$('#userCardEditForm input[name=portrait]').val(imgUrl);
				}
			}
			// 其他参数继承自jquery.imgcutter.js
		});
		$('#userCardEditForm .avatar .avatar_img').click(function(event) {
			$('#avatarUpload').click();
		});
		// 个人信息验证绑定 && 输入控制
		//$('#userCardEditUserName, #userCardEditPositionName, #userCardEditIntroduce').on('keydown', function(e) {
		//	var thisValue = $(this).val(),
		//		trimValue = $.trim(thisValue),
		//		subLength = $(this).attr('data-maxlength') - 0;
		//	/*if ($.trim(thisValue).length >= subLength) {
		//		// 中文输入法BUG
		//		if ((e.which >= 48 && e.which <= 90 || e.which >= 96 && e.which <= 111 || e.which >= 186 && e.which <= 192 || e.which >= 219 && e.which <= 222 || e.which == 13) && (
		//				$(this).prop('selectionEnd') - $(this).prop('selectionStart') <= 0 ||
		//				$(this).prop('selectionEnd') <= thisValue.search(/\S/) ||
		//				$(this).prop('selectionStart') >= thisValue.search(/\S/) + $.trim(thisValue).length
		//			)) {
		//			// 实键 + enter 且（无选中或者选中位于非空串前后）
		//			e.preventDefault();
		//		} else if (e.which == 32 && $(this).prop('selectionEnd') - $(this).prop('selectionStart') <= 0 && $(this).prop('selectionStart') > thisValue.search(/\S/) && $(this).prop('selectionEnd') < thisValue.search(/\S/) + $.trim(thisValue).length) {
		//			// 空格键 且（无选中且位于非空串中）
		//			e.preventDefault();
		//		}
		//	}*/
		//	var exceptKeyCodeArrs = [27, 8, 9, 20, 16, 17, 18, 91, 93, 45, 46, 144, 229];
		//	// F1-F12、Page Up、Page Down、End、Home、方向键及其他功能键（去除回车、空格）、输入法
		//	if ($.trim(thisValue).length >= subLength && !(e.which >= 112 && e.which <= 123 || e.which >= 33 && e.which <= 40) && $.inArray(e.which, exceptKeyCodeArrs) == -1 && $.trim(window.getSelection()).length < 1) {
		//		e.preventDefault();
		//		$(this).val(thisValue.replace(trimValue, trimValue.substring(0, subLength)));
		//	}
		//});
		var IMELock = false;
		// compositionstart、compositionend 输入法开始、结束
		// $('#userCardEditUserName, #userCardEditPositionName, #userCardEditIntroduce').on('compositionstart', function(e) {
		// 	IMELock = true;
		// });
		// $('#userCardEditUserName, #userCardEditPositionName, #userCardEditIntroduce').on('compositionend', function(e) {
		// 	IMELock = false;
		// });
		$('#userCardEditUserName, #userCardEditPositionName, #userCardEditIntroduce').on('input', function(e) {
			// var thisValue = $(this).val(),
			// 	trimValue = $.trim(thisValue),
			// 	subLength = $(this).attr('data-maxlength') - 0;
			// if (trimValue.length > subLength && !IMELock) {
			// 	$(this).val(thisValue.replace(trimValue, trimValue.substring(0, subLength)));
			// }
			submitCheck();
		});
		$('#userCardEditUserName').on('change', function(e) {
			$(this).val($.trim($(this).val()));
			userNameCheck(submitCheck);
		});
		$('#userCardEditPositionName, #userCardEditIntroduce').on('change', function(e) {
			$(this).val($.trim($(this).val()));
			submitCheck();
		});

		// 昵称校验
		function userNameValidate() {
			var $input = $('#userCardEditUserName'),
				inputVal = $input.val();
			if (!inputVal) {
				showInputTips('昵称不能为空', $input);
				return false;
			} else if (inputVal.length > 15 && !IMELock) {
				// showInputTips('昵称最大长度不能超过15个字符', $input);
				return false;
			} else {
				hideInputTips($input);
			};

			return true;
		}

		var userNameCheckRight = true;
		// 延迟时间ms
		var userNameCheckDelay = 200,
			// 最后一次用户名输入的时间戳 
			lastUserNameCheck = 0;

		// 用户名验证
		function userNameCheck(handler) {
			var $userNameInput = $('#userCardEditUserName');
			var userName = $.trim($userNameInput.val());
			if (!userNameValidate()) {
				return false;
			}
			var now = new Date().getTime();
			lastUserNameCheck = now;
			setTimeout(function() {
				// 如果延时设定内没有再次触发校验
				if (lastUserNameCheck - now == 0) {

					helper.ajax({
						url: config.url.validateUserName,
						type: 'POST',
						data: {
							userName: $.trim(userName) || ''
						}
					}).done(function(data) {
						if (data.state == 1) {
							userNameCheckRight = true;
							hideInputTips($userNameInput);
						} else if (data.state == 302) {
							userNameCheckRight = false;
							showInputTips('昵称存在敏感词', $userNameInput);
							console.log(data.message);
						} else {
							userNameCheckRight = false;
							showInputTips('昵称校验失败，请使用其他昵称', $userNameInput);
							console.log(data.message);
						}
					}).fail(function() {
						userNameCheckRight = false;
						showInputTips('昵称校验失败，请刷新重试', $userNameInput);
						console.log('validateUserName error');
					}).always(function() {
						handler && handler();
					});

				}
			}, userNameCheckDelay);
		}

		// 职业校验
		function positionNameValidate() {
			var $input = $('#userCardEditPositionName'),
				inputVal = $input.val();
			if (!inputVal) {
				showInputTips('职业不能为空', $input);
				return false;
			} else if (inputVal.length > 70 && !IMELock) {
				// showInputTips('职业最大长度不能超过70个字符', $input);
				return false;
			} else {
				hideInputTips($input);
			};
			return true;
		}

		// 个人介绍校验
		function introduceValidate() {
			var $input = $('#userCardEditIntroduce'),
				inputVal = $input.val();
			if (!inputVal) {
				showInputTips('个人介绍不能为空', $input);
				return false;
			} else if (inputVal.length > 30 && !IMELock) {
				// showInputTips('个人介绍最大长度不能超过30个字符', $input);
				return false;
			} else {
				hideInputTips($input);
			};
			return true;
		}

		// 校验提示
		$('#userCardEdit .input_box').on('click', 'em.error', function(e) {
			$(this).siblings('input, textarea').focus();
		});

		function showInputTips(tips, input) {
			var $input = $(input);
			if ($input.siblings('em.error').size() < 1) {
				$input.after('<em class="error"></em>');
			}
			$input.siblings('em.error').html(tips).show();
		}

		function hideInputTips(input) {
			var $input = $(input);
			if ($input.siblings('em.error').size() > 0) {
				$input.siblings('em.error').hide();
			}
		}

		// 提交验证
		function submitCheck() {
			var userNameOK = userNameValidate(),
				positionNameOK = positionNameValidate(),
				introduceOK = introduceValidate();

			if (userNameOK && positionNameOK && introduceOK && userNameCheckRight) {
				$('#userCardEdit .user_card_save').removeClass('btn_disable');
				return true;
			} else {
				$('#userCardEdit .user_card_save').addClass('btn_disable');
				return false
			}
		}

		// 保存个人信息
		$('#userCardEdit').on('click', '.user_card_save', function(e) {

			submitCheck() && userNameCheck(function() {
				submitCheck() && saveUserinfo();
				// $('#userCardEditForm').submit();
			});

		});

		// 取消编辑个人信息
		$('#userCardEdit').on('click', '.user_card_cancel', function(e) {

			$('#userCardNormal').show();
			$('#userCardEdit').hide();
			$('#userCardEditForm').get(0).reset();
			$('#userCardEditForm .avatar .avatar_img').prop('src', originalAvatarImg);
			$('#userCardEditForm input[name=portrait]').val(originalAvatarValue);
		});

	})();

	// 保存用户信息
	function saveUserinfo() {

		helper.ajax({
			url: config.url.saveUserinfo,
			type: 'POST',
			data: {
				portrait: $('#userCardEditForm input[name=portrait]').val() || '',
				userName: $('#userCardEditForm input[name=userName]').val().replace(/\r\n/g, '').replace(/\n/g, '') || '',
				sex: $('#userCardEditForm input[name=sex]:checked').val() || 'MALE',
				positionName: $('#userCardEditForm input[name=positionName]').val().replace(/\r\n/g, '').replace(/\n/g, '') || '',
				introduce: $('#userCardEditForm textarea[name=introduce]').val().replace(/\r\n/g, '').replace(/\n/g, '') || ''
			}
		}).done(function(data) {
			if (data.state == 1) {
				window.location.reload();
			} else if (data.state == 304) {
				PASSPORT.loginPopup();
			} else if (data.state == 201) {
				helper.alertTips('你还没有添加职业信息哦！');
			} else if (data.state == 202) {
				helper.alertTips('职业信息最多填写50个字！');
			} else if (data.state == 203) {
				helper.alertTips('你还没有添加个人介绍哦！');
			} else if (data.state == 204) {
				helper.alertTips('个人介绍最多填写30个字！');
			} else if (data.state == 205) {
				helper.alertTips('你还没有填写昵称哦！');
			} else if (data.state == 206) {
				helper.alertTips('昵称最好不要超过15个字！');
			} else if (data.state == 207) {
				helper.alertTips('记得给自己上传个头像！');
			} else {
				helper.alertTips(data.message);
				console.log(data.message);
			}
		}).fail(function() {
			helper.alertTips('保存用户信息失败');
			console.log('saveUserinfo error');
		});

	}

	$(".register_btn").bind("click", function() {
		PASSPORT.registerPopup();
	});

});

/*!community/modules/common/ad-side/main.js*/
;/**
 * 问答社区-侧边广告轮播
 * 
 */
define('community/modules/common/ad-side/main', ['require', 'exports', 'module', 'common/widgets/plat/poster'], function(require, exports, module) {

	// 广告位
	var getMultipleAds = require('common/widgets/plat/poster').getMultipleAds;

	var maxCallNum = 10,
		hasInited = false,
		index = 0,
		$ads = $('#multiAdSite .slider_wrap > a, #multiAdSite .slider_wrap > img'),
		$nav = $('<ul></ul>');

	var sliderTime;

	(function initSlider() {
		// if (maxCallNum == 0 || hasInited) {
		// 	return;
		// }
		if (hasInited) {
			return;
		}

		getMultipleAds('', function() {
			if ($ads.size() < 1) {
				$ads = $('#multiAdSite .slider_wrap > a, #multiAdSite .slider_wrap > img');
				if ($ads.size() > 0) {
					if ($ads.size() > 1) {
						for (var i = 0; i < $ads.size(); i++) {
							$nav.append('<li><a rel="nofollow" href="javascript:void(0);" >' + i + '</a></li>');
						}
						$('#multiAdSite .slider_nav').append($nav);
						$ads.first().show().siblings().hide();
						$nav.find('li').first().addClass('current').siblings().removeClass('current');
						setTimeout(slideSlider, 5000);
					}

					$('#multiAdSite').on('click', '.slider_nav li > a', function(e) {
						index = $('#multiAdSite .slider_nav li > a').index($(this));
						showSlider(index);
						e.preventDefault();
					});

					hasInited = true;
				}
			}
		});

		// maxCallNum--;
		// setTimeout(initSlider, 500);

	})();

	function slideSlider() {
		if ($ads.size() > 1) {
			if (index < $ads.size()) {
				index++;
			} else {
				index = 0;
			}
			$ads.eq(index).fadeIn(1000).siblings().fadeOut(1000);
			$nav.find('li').eq(index).addClass('current').siblings().removeClass('current');
			sliderTime = setTimeout(slideSlider, 5000);
		}
	}

	function showSlider(index) {
		if ($ads.size() > 1) {
			clearTimeout(sliderTime);
			$ads.eq(index).fadeIn(1000).siblings().fadeOut(1000);
			$nav.find('li').eq(index).addClass('current').siblings().removeClass('current');
			sliderTime = setTimeout(slideSlider, 5000);
		}
	}
});

/*!dep/jQuery.dotdotdot/src/jquery.dotdotdot.js*/
;define('dep/jQuery.dotdotdot/src/jquery.dotdotdot', ['require', 'exports', 'module'], function(require, exports, module) {

  /*
   *	jQuery dotdotdot 1.8.0
   *
   *	Copyright (c) Fred Heusschen
   *	www.frebsite.nl
   *
   *	Plugin website:
   *	dotdotdot.frebsite.nl
   *
   *	Licensed under the MIT license.
   *	http://en.wikipedia.org/wiki/MIT_License
   */
  
  (function( $, undef )
  {
  	if ( $.fn.dotdotdot )
  	{
  		return;
  	}
  
  	$.fn.dotdotdot = function( o )
  	{
  		if ( this.length == 0 )
  		{
  			$.fn.dotdotdot.debug( 'No element found for "' + this.selector + '".' );
  			return this;
  		}
  		if ( this.length > 1 )
  		{
  			return this.each(
  				function()
  				{
  					$(this).dotdotdot( o );
  				}
  			);
  		}
  
  
  		var $dot = this;
  		var orgContent	= $dot.contents();
  
  		if ( $dot.data( 'dotdotdot' ) )
  		{
  			$dot.trigger( 'destroy.dot' );
  		}
  
  		$dot.data( 'dotdotdot-style', $dot.attr( 'style' ) || '' );
  		$dot.css( 'word-wrap', 'break-word' );
  		if ($dot.css( 'white-space' ) === 'nowrap')
  		{
  			$dot.css( 'white-space', 'normal' );
  		}
  
  		$dot.bind_events = function()
  		{
  			$dot.bind(
  				'update.dot',
  				function( e, c )
  				{
  					$dot.removeClass("is-truncated");
  					e.preventDefault();
  					e.stopPropagation();
  
  					switch( typeof opts.height )
  					{
  						case 'number':
  							opts.maxHeight = opts.height;
  							break;
  
  						case 'function':
  							opts.maxHeight = opts.height.call( $dot[ 0 ] );
  							break;
  
  						default:
  							opts.maxHeight = getTrueInnerHeight( $dot );
  							break;
  					}
  
  					opts.maxHeight += opts.tolerance;
  
  					if ( typeof c != 'undefined' )
  					{
  						if ( typeof c == 'string' || ('nodeType' in c && c.nodeType === 1) )
  						{
  					 		c = $('<div />').append( c ).contents();
  						}
  						if ( c instanceof $ )
  						{
  							orgContent = c;
  						}
  					}
  
  					$inr = $dot.wrapInner( '<div class="dotdotdot" />' ).children();
  					$inr.contents()
  						.detach()
  						.end()
  						.append( orgContent.clone( true ) )
  						.find( 'br' )
  						.replaceWith( '  <br />  ' )
  						.end()
  						.css({
  							'height'	: 'auto',
  							'width'		: 'auto',
  							'border'	: 'none',
  							'padding'	: 0,
  							'margin'	: 0
  						});
  
  					var after = false,
  						trunc = false;
  
  					if ( conf.afterElement )
  					{
  						after = conf.afterElement.clone( true );
  					    after.show();
  						conf.afterElement.detach();
  					}
  
  					if ( test( $inr, opts ) )
  					{
  						if ( opts.wrap == 'children' )
  						{
  							trunc = children( $inr, opts, after );
  						}
  						else
  						{
  							trunc = ellipsis( $inr, $dot, $inr, opts, after );
  						}
  					}
  					$inr.replaceWith( $inr.contents() );
  					$inr = null;
  
  					if ( $.isFunction( opts.callback ) )
  					{
  						opts.callback.call( $dot[ 0 ], trunc, orgContent );
  					}
  
  					conf.isTruncated = trunc;
  					return trunc;
  				}
  
  			).bind(
  				'isTruncated.dot',
  				function( e, fn )
  				{
  					e.preventDefault();
  					e.stopPropagation();
  
  					if ( typeof fn == 'function' )
  					{
  						fn.call( $dot[ 0 ], conf.isTruncated );
  					}
  					return conf.isTruncated;
  				}
  
  			).bind(
  				'originalContent.dot',
  				function( e, fn )
  				{
  					e.preventDefault();
  					e.stopPropagation();
  
  					if ( typeof fn == 'function' )
  					{
  						fn.call( $dot[ 0 ], orgContent );
  					}
  					return orgContent;
  				}
  
  			).bind(
  				'destroy.dot',
  				function( e )
  				{
  					e.preventDefault();
  					e.stopPropagation();
  
  					$dot.unwatch()
  						.unbind_events()
  						.contents()
  						.detach()
  						.end()
  						.append( orgContent )
  						.attr( 'style', $dot.data( 'dotdotdot-style' ) || '' )
  						.removeClass( 'is-truncated' )
  						.data( 'dotdotdot', false );
  				}
  			);
  			return $dot;
  		};	//	/bind_events
  
  		$dot.unbind_events = function()
  		{
  			$dot.unbind('.dot');
  			return $dot;
  		};	//	/unbind_events
  
  		$dot.watch = function()
  		{
  			$dot.unwatch();
  			if ( opts.watch == 'window' )
  			{
  				var $window = $(window),
  					_wWidth = $window.width(),
  					_wHeight = $window.height();
  
  				$window.bind(
  					'resize.dot' + conf.dotId,
  					function()
  					{
  						if ( _wWidth != $window.width() || _wHeight != $window.height() || !opts.windowResizeFix )
  						{
  							_wWidth = $window.width();
  							_wHeight = $window.height();
  
  							if ( watchInt )
  							{
  								clearInterval( watchInt );
  							}
  							watchInt = setTimeout(
  								function()
  								{
  									$dot.trigger( 'update.dot' );
  								}, 100
  							);
  						}
  					}
  				);
  			}
  			else
  			{
  				watchOrg = getSizes( $dot );
  				watchInt = setInterval(
  					function()
  					{
  						if ( $dot.is( ':visible' ) )
  						{
  							var watchNew = getSizes( $dot );
  							if ( watchOrg.width  != watchNew.width ||
  								 watchOrg.height != watchNew.height )
  							{
  								$dot.trigger( 'update.dot' );
  								watchOrg = watchNew;
  							}
  						}
  					}, 500
  				);
  			}
  			return $dot;
  		};
  		$dot.unwatch = function()
  		{
  			$(window).unbind( 'resize.dot' + conf.dotId );
  			if ( watchInt )
  			{
  				clearInterval( watchInt );
  			}
  			return $dot;
  		};
  
  		var	opts 		= $.extend( true, {}, $.fn.dotdotdot.defaults, o ),
  			conf		= {},
  			watchOrg	= {},
  			watchInt	= null,
  			$inr		= null;
  
  
  		if ( !( opts.lastCharacter.remove instanceof Array ) )
  		{
  			opts.lastCharacter.remove = $.fn.dotdotdot.defaultArrays.lastCharacter.remove;
  		}
  		if ( !( opts.lastCharacter.noEllipsis instanceof Array ) )
  		{
  			opts.lastCharacter.noEllipsis = $.fn.dotdotdot.defaultArrays.lastCharacter.noEllipsis;
  		}
  
  
  		conf.afterElement	= getElement( opts.after, $dot );
  		conf.isTruncated	= false;
  		conf.dotId			= dotId++;
  
  
  		$dot.data( 'dotdotdot', true )
  			.bind_events()
  			.trigger( 'update.dot' );
  
  		if ( opts.watch )
  		{
  			$dot.watch();
  		}
  
  		return $dot;
  	};
  
  
  	//	public
  	$.fn.dotdotdot.defaults = {
  		'ellipsis'			: '... ',
  		'wrap'				: 'word',
  		'fallbackToLetter'	: true,
  		'lastCharacter'		: {},
  		'tolerance'			: 0,
  		'callback'			: null,
  		'after'				: null,
  		'height'			: null,
  		'watch'				: false,
  		'windowResizeFix'	: true
  	};
  	$.fn.dotdotdot.defaultArrays = {
  		'lastCharacter'		: {
  			'remove'			: [ ' ', '\u3000', ',', ';', '.', '!', '?' ],
  			'noEllipsis'		: []
  		}
  	};
  	$.fn.dotdotdot.debug = function( msg ) {};
  
  
  	//	private
  	var dotId = 1;
  
  	function children( $elem, o, after )
  	{
  		var $elements 	= $elem.children(),
  			isTruncated	= false;
  
  		$elem.empty();
  
  		for ( var a = 0, l = $elements.length; a < l; a++ )
  		{
  			var $e = $elements.eq( a );
  			$elem.append( $e );
  			if ( after )
  			{
  				$elem.append( after );
  			}
  			if ( test( $elem, o ) )
  			{
  				$e.remove();
  				isTruncated = true;
  				break;
  			}
  			else
  			{
  				if ( after )
  				{
  					after.detach();
  				}
  			}
  		}
  		return isTruncated;
  	}
  	function ellipsis( $elem, $d, $i, o, after )
  	{
  		var isTruncated	= false;
  
  		//	Don't put the ellipsis directly inside these elements
  		var notx = 'a, table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style';
  
  		//	Don't remove these elements even if they are after the ellipsis
  		var noty = 'script, .dotdotdot-keep';
  
  		$elem
  			.contents()
  			.detach()
  			.each(
  				function()
  				{
  
  					var e	= this,
  						$e	= $(e);
  
  					if ( typeof e == 'undefined' )
  					{
  						return true;
  					}
  					else if ( $e.is( noty ) )
  					{
  						$elem.append( $e );
  					}
  					else if ( isTruncated )
  					{
  						return true;
  					}
  					else
  					{
  						$elem.append( $e );
  						if ( after && !$e.is( o.after ) && !$e.find( o.after ).length  )
  						{
  							$elem[ $elem.is( notx ) ? 'after' : 'append' ]( after );
  						}
  						if ( test( $i, o ) )
  						{
  							if ( e.nodeType == 3 ) // node is TEXT
  							{
  								isTruncated = ellipsisElement( $e, $d, $i, o, after );
  							}
  							else
  							{
  								isTruncated = ellipsis( $e, $d, $i, o, after );
  							}
  						}
  
  						if ( !isTruncated )
  						{
  							if ( after )
  							{
  								after.detach();
  							}
  						}
  					}
  				}
  			);
  		$d.addClass("is-truncated");
  		return isTruncated;
  	}
  	function ellipsisElement( $e, $d, $i, o, after )
  	{
  		var e = $e[ 0 ];
  
  		if ( !e )
  		{
  			return false;
  		}
  
  		var txt			= getTextContent( e ),
  			space		= ( txt.indexOf(' ') !== -1 ) ? ' ' : '\u3000',
  			separator	= ( o.wrap == 'letter' ) ? '' : space,
  			textArr		= txt.split( separator ),
  			position 	= -1,
  			midPos		= -1,
  			startPos	= 0,
  			endPos		= textArr.length - 1;
  
  
  		//	Only one word
  		if ( o.fallbackToLetter && startPos == 0 && endPos == 0 )
  		{
  			separator	= '';
  			textArr		= txt.split( separator );
  			endPos		= textArr.length - 1;
  		}
  
  		while ( startPos <= endPos && !( startPos == 0 && endPos == 0 ) )
  		{
  			var m = Math.floor( ( startPos + endPos ) / 2 );
  			if ( m == midPos )
  			{
  				break;
  			}
  			midPos = m;
  
  			setTextContent( e, textArr.slice( 0, midPos + 1 ).join( separator ) + o.ellipsis );
  			$i.children()
  				.each(
  					function()
  					{
  						$(this).toggle().toggle();
  					}
  				);
  
  			if ( !test( $i, o ) )
  			{
  				position = midPos;
  				startPos = midPos;
  			}
  			else
  			{
  				endPos = midPos;
  
  				//	Fallback to letter
  				if (o.fallbackToLetter && startPos == 0 && endPos == 0 )
  				{
  					separator	= '';
  					textArr		= textArr[ 0 ].split( separator );
  					position	= -1;
  					midPos		= -1;
  					startPos	= 0;
  					endPos		= textArr.length - 1;
  				}
  			}
  		}
  
  		if ( position != -1 && !( textArr.length == 1 && textArr[ 0 ].length == 0 ) )
  		{
  			txt = addEllipsis( textArr.slice( 0, position + 1 ).join( separator ), o );
  			setTextContent( e, txt );
  		}
  		else
  		{
  			var $w = $e.parent();
  			$e.detach();
  
  			var afterLength = ( after && after.closest($w).length ) ? after.length : 0;
  
  			if ( $w.contents().length > afterLength )
  			{
  				e = findLastTextNode( $w.contents().eq( -1 - afterLength ), $d );
  			}
  			else
  			{
  				e = findLastTextNode( $w, $d, true );
  				if ( !afterLength )
  				{
  					$w.detach();
  				}
  			}
  			if ( e )
  			{
  				txt = addEllipsis( getTextContent( e ), o );
  				setTextContent( e, txt );
  				if ( afterLength && after )
  				{
  					$(e).parent().append( after );
  				}
  			}
  		}
  
  		return true;
  	}
  	function test( $i, o )
  	{
  		return $i.innerHeight() > o.maxHeight;
  	}
  	function addEllipsis( txt, o )
  	{
  		while( $.inArray( txt.slice( -1 ), o.lastCharacter.remove ) > -1 )
  		{
  			txt = txt.slice( 0, -1 );
  		}
  		if ( $.inArray( txt.slice( -1 ), o.lastCharacter.noEllipsis ) < 0 )
  		{
  			txt += o.ellipsis;
  		}
  		return txt;
  	}
  	function getSizes( $d )
  	{
  		return {
  			'width'	: $d.innerWidth(),
  			'height': $d.innerHeight()
  		};
  	}
  	function setTextContent( e, content )
  	{
  		if ( e.innerText )
  		{
  			e.innerText = content;
  		}
  		else if ( e.nodeValue )
  		{
  			e.nodeValue = content;
  		}
  		else if (e.textContent)
  		{
  			e.textContent = content;
  		}
  
  	}
  	function getTextContent( e )
  	{
  		if ( e.innerText )
  		{
  			return e.innerText;
  		}
  		else if ( e.nodeValue )
  		{
  			return e.nodeValue;
  		}
  		else if ( e.textContent )
  		{
  			return e.textContent;
  		}
  		else
  		{
  			return "";
  		}
  	}
  	function getPrevNode( n )
  	{
  		do
  		{
  			n = n.previousSibling;
  		}
  		while ( n && n.nodeType !== 1 && n.nodeType !== 3 );
  
  		return n;
  	}
  	function findLastTextNode( $el, $top, excludeCurrent )
  	{
  		var e = $el && $el[ 0 ], p;
  		if ( e )
  		{
  			if ( !excludeCurrent )
  			{
  				if ( e.nodeType === 3 )
  				{
  					return e;
  				}
  				if ( $.trim( $el.text() ) )
  				{
  					return findLastTextNode( $el.contents().last(), $top );
  				}
  			}
  			p = getPrevNode( e );
  			while ( !p )
  			{
  				$el = $el.parent();
  				if ( $el.is( $top ) || !$el.length )
  				{
  					return false;
  				}
  				p = getPrevNode( $el[0] );
  			}
  			if ( p )
  			{
  				return findLastTextNode( $(p), $top );
  			}
  		}
  		return false;
  	}
  	function getElement( e, $i )
  	{
  		if ( !e )
  		{
  			return false;
  		}
  		if ( typeof e === 'string' )
  		{
  			e = $(e, $i);
  			return ( e.length )
  				? e
  				: false;
  		}
  		return !e.jquery
  			? false
  			: e;
  	}
  	function getTrueInnerHeight( $el )
  	{
  		var h = $el.innerHeight(),
  			a = [ 'paddingTop', 'paddingBottom' ];
  
  		for ( var z = 0, l = a.length; z < l; z++ )
  		{
  			var m = parseInt( $el.css( a[ z ] ), 10 );
  			if ( isNaN( m ) )
  			{
  				m = 0;
  			}
  			h -= m;
  		}
  		return h;
  	}
  
  
  	//	override jQuery.html
  	var _orgHtml = $.fn.html;
  	$.fn.html = function( str )
  	{
  		if ( str != undef && !$.isFunction( str ) && this.data( 'dotdotdot' ) )
  		{
  			return this.trigger( 'update', [ str ] );
  		}
  		return _orgHtml.apply( this, arguments );
  	};
  
  
  	//	override jQuery.text
  	var _orgText = $.fn.text;
  	$.fn.text = function( str )
  	{
  		if ( str != undef && !$.isFunction( str ) && this.data( 'dotdotdot' ) )
  		{
  			str = $( '<div />' ).text( str ).html();
  			return this.trigger( 'update', [ str ] );
  		}
  		return _orgText.apply( this, arguments );
  	};
  
  
  })( jQuery );
  
  /*
  
  ## Automatic parsing for CSS classes
  Contributed by [Ramil Valitov](https://github.com/rvalitov)
  
  ### The idea
  You can add one or several CSS classes to HTML elements to automatically invoke "jQuery.dotdotdot functionality" and some extra features. It allows to use jQuery.dotdotdot only by adding appropriate CSS classes without JS programming.
  
  ### Available classes and their description
  * dot-ellipsis - automatically invoke jQuery.dotdotdot to this element. This class must be included if you plan to use other classes below.
  * dot-resize-update - automatically update if window resize event occurs. It's equivalent to option `watch:'window'`.
  * dot-timer-update - automatically update if window resize event occurs. It's equivalent to option `watch:true`.
  * dot-load-update - automatically update after the window has beem completely rendered. Can be useful if your content is generated dynamically using using JS and, hence, jQuery.dotdotdot can't correctly detect the height of the element before it's rendered completely.
  * dot-height-XXX - available height of content area in pixels, where XXX is a number, e.g. can be `dot-height-35` if you want to set maximum height for 35 pixels. It's equivalent to option `height:'XXX'`.
  
  ### Usage examples
  *Adding jQuery.dotdotdot to element*
      
  	<div class="dot-ellipsis">
  	<p>Lorem Ipsum is simply dummy text.</p>
  	</div>
  	
  *Adding jQuery.dotdotdot to element with update on window resize*
      
  	<div class="dot-ellipsis dot-resize-update">
  	<p>Lorem Ipsum is simply dummy text.</p>
  	</div>
  	
  *Adding jQuery.dotdotdot to element with predefined height of 50px*
      
  	<div class="dot-ellipsis dot-height-50">
  	<p>Lorem Ipsum is simply dummy text.</p>
  	</div>
  	
  */
  
  jQuery(document).ready(function($) {
  	//We only invoke jQuery.dotdotdot on elements that have dot-ellipsis class
  	$(".dot-ellipsis").each(function(){
  		//Checking if update on window resize required
  		var watch_window=$(this).hasClass("dot-resize-update");
  		
  		//Checking if update on timer required
  		var watch_timer=$(this).hasClass("dot-timer-update");
  		
  		//Checking if height set
  		var height=0;		
  		var classList = $(this).attr('class').split(/\s+/);
  		$.each(classList, function(index, item) {
  			if (!item.match('/^dot\-height\-\d+$/')) {
  				height=Number(item.substr(item.indexOf('-',-1)+1));
  			}
  		});
  		
  		//Invoking jQuery.dotdotdot
  		var x = new Object();
  		if (watch_timer)
  			x.watch=true;
  		if (watch_window)
  			x.watch='window';
  		if (height>0)
  			x.height=height;
  		$(this).dotdotdot(x);
  	});
  		
  });
  
  //Updating elements (if any) on window.load event
  jQuery(window).load(function(){
  	jQuery(".dot-ellipsis.dot-load-update").trigger("update.dot");
  });

});
/*!community/modules/common/user-card-float/main.js*/
;/**
 * 问答社区-浮动用户卡片
 * 
 * @author fridayhu@lagou.com
 *
 * @require "community/modules/common/user-card-float/main.less"
 * 
 */
define('community/modules/common/user-card-float/main', ['require', 'exports', 'module', 'community/modules/common/main', 'dep/artTemplate/dist/template'], function(require, exports, module) {

	var config = require('community/modules/common/main').config,
		helper = require('community/modules/common/main').helper;
	var template = require('dep/artTemplate/dist/template');

	/**
	 * artTemplate3.01中存在bug，{{userinfoFloat | userCardFloat:curUserid}}传入的参数会转为字符串，更新3.03前不要使用此辅助方法
	 * 可在js中用template.compile直接传入参数渲染模板
	 * 或者利用fis3内容嵌入能力嵌入到父模板中使用
	 */
	/*template.helper('userCardFloat', function(userinfoFloat, curUserid) {
		if (!userinfoFloat) {
			return;
		}
		var tpl = __inline('./tpl/main.tpl');
		var htmlStr = template.compile(tpl)({
			userinfoFloat: userinfoFloat,
			curUserid: curUserid,
			FE_base: GLOBAL_DOMAIN.ctx,
			FE_zbase: GLOBAL_DOMAIN.zctx,
			FE_lgsbase: GLOBAL_DOMAIN.lgsctx,
			cdndomain: window.GLOBAL_CDN_DOMAIN
		});
		return htmlStr;
	});*/

	// 关注
	var followLoadingHtml = '<div class="loading2">Loading...</div>';
	$('body').on('click', '.user_card_float .user_follow_btn', function(e) {
		var $this = $(this);
		if ($this.data('isLoading')) {
			return;
		}
		var userId = $this.attr('data-user-id');
		var originHtml = $this.html();
		$this.html(followLoadingHtml);
		$this.data('isLoading', true);
		if ($this.hasClass('btn_cancel')) {
			// 取消关注
			helper.cancelFollowUser(userId, {
				done: function(data) {
					$this.removeClass('btn_cancel').html('<i>加</i>关注');
					$('.user_card_float .user_follow_btn[data-user-id=' + userId + ']').removeClass('btn_cancel').html('<i>加</i>关注');
				},
				fail: function() {
					$this.html(originHtml);
				},
				always: function() {
					$this.removeData('isLoading');
				}
			});
		} else {
			// 关注
			helper.followUser(userId, {
				done: function(data) {
					$this.addClass('btn_cancel').html('已关注');
					$('.user_card_float .user_follow_btn[data-user-id=' + userId + ']').addClass('btn_cancel').html('已关注');
				},
				fail: function() {
					$this.html(originHtml);
				},
				always: function() {
					$this.removeData('isLoading');
				}
			});
		}
	});
	$('body').on('mouseenter', '.user_card_float .user_follow_btn.btn_cancel', function(e) {
		$(this).html('取消');
	});
	$('body').on('mouseleave', '.user_card_float .user_follow_btn.btn_cancel', function(e) {
		$(this).html('已关注');
	});

});

/*!dep/jquery-qrcode/jquery.qrcode.min.js*/
;define('dep/jquery-qrcode/jquery.qrcode.min', ['require', 'exports', 'module'], function(require, exports, module) {

  (function(r){r.fn.qrcode=function(h){var s;function u(a){this.mode=s;this.data=a}function o(a,c){this.typeNumber=a;this.errorCorrectLevel=c;this.modules=null;this.moduleCount=0;this.dataCache=null;this.dataList=[]}function q(a,c){if(void 0==a.length)throw Error(a.length+"/"+c);for(var d=0;d<a.length&&0==a[d];)d++;this.num=Array(a.length-d+c);for(var b=0;b<a.length-d;b++)this.num[b]=a[b+d]}function p(a,c){this.totalCount=a;this.dataCount=c}function t(){this.buffer=[];this.length=0}u.prototype={getLength:function(){return this.data.length},
  write:function(a){for(var c=0;c<this.data.length;c++)a.put(this.data.charCodeAt(c),8)}};o.prototype={addData:function(a){this.dataList.push(new u(a));this.dataCache=null},isDark:function(a,c){if(0>a||this.moduleCount<=a||0>c||this.moduleCount<=c)throw Error(a+","+c);return this.modules[a][c]},getModuleCount:function(){return this.moduleCount},make:function(){if(1>this.typeNumber){for(var a=1,a=1;40>a;a++){for(var c=p.getRSBlocks(a,this.errorCorrectLevel),d=new t,b=0,e=0;e<c.length;e++)b+=c[e].dataCount;
  for(e=0;e<this.dataList.length;e++)c=this.dataList[e],d.put(c.mode,4),d.put(c.getLength(),j.getLengthInBits(c.mode,a)),c.write(d);if(d.getLengthInBits()<=8*b)break}this.typeNumber=a}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17;this.modules=Array(this.moduleCount);for(var d=0;d<this.moduleCount;d++){this.modules[d]=Array(this.moduleCount);for(var b=0;b<this.moduleCount;b++)this.modules[d][b]=null}this.setupPositionProbePattern(0,0);this.setupPositionProbePattern(this.moduleCount-
  7,0);this.setupPositionProbePattern(0,this.moduleCount-7);this.setupPositionAdjustPattern();this.setupTimingPattern();this.setupTypeInfo(a,c);7<=this.typeNumber&&this.setupTypeNumber(a);null==this.dataCache&&(this.dataCache=o.createData(this.typeNumber,this.errorCorrectLevel,this.dataList));this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,c){for(var d=-1;7>=d;d++)if(!(-1>=a+d||this.moduleCount<=a+d))for(var b=-1;7>=b;b++)-1>=c+b||this.moduleCount<=c+b||(this.modules[a+d][c+b]=
  0<=d&&6>=d&&(0==b||6==b)||0<=b&&6>=b&&(0==d||6==d)||2<=d&&4>=d&&2<=b&&4>=b?!0:!1)},getBestMaskPattern:function(){for(var a=0,c=0,d=0;8>d;d++){this.makeImpl(!0,d);var b=j.getLostPoint(this);if(0==d||a>b)a=b,c=d}return c},createMovieClip:function(a,c,d){a=a.createEmptyMovieClip(c,d);this.make();for(c=0;c<this.modules.length;c++)for(var d=1*c,b=0;b<this.modules[c].length;b++){var e=1*b;this.modules[c][b]&&(a.beginFill(0,100),a.moveTo(e,d),a.lineTo(e+1,d),a.lineTo(e+1,d+1),a.lineTo(e,d+1),a.endFill())}return a},
  setupTimingPattern:function(){for(var a=8;a<this.moduleCount-8;a++)null==this.modules[a][6]&&(this.modules[a][6]=0==a%2);for(a=8;a<this.moduleCount-8;a++)null==this.modules[6][a]&&(this.modules[6][a]=0==a%2)},setupPositionAdjustPattern:function(){for(var a=j.getPatternPosition(this.typeNumber),c=0;c<a.length;c++)for(var d=0;d<a.length;d++){var b=a[c],e=a[d];if(null==this.modules[b][e])for(var f=-2;2>=f;f++)for(var i=-2;2>=i;i++)this.modules[b+f][e+i]=-2==f||2==f||-2==i||2==i||0==f&&0==i?!0:!1}},setupTypeNumber:function(a){for(var c=
  j.getBCHTypeNumber(this.typeNumber),d=0;18>d;d++){var b=!a&&1==(c>>d&1);this.modules[Math.floor(d/3)][d%3+this.moduleCount-8-3]=b}for(d=0;18>d;d++)b=!a&&1==(c>>d&1),this.modules[d%3+this.moduleCount-8-3][Math.floor(d/3)]=b},setupTypeInfo:function(a,c){for(var d=j.getBCHTypeInfo(this.errorCorrectLevel<<3|c),b=0;15>b;b++){var e=!a&&1==(d>>b&1);6>b?this.modules[b][8]=e:8>b?this.modules[b+1][8]=e:this.modules[this.moduleCount-15+b][8]=e}for(b=0;15>b;b++)e=!a&&1==(d>>b&1),8>b?this.modules[8][this.moduleCount-
  b-1]=e:9>b?this.modules[8][15-b-1+1]=e:this.modules[8][15-b-1]=e;this.modules[this.moduleCount-8][8]=!a},mapData:function(a,c){for(var d=-1,b=this.moduleCount-1,e=7,f=0,i=this.moduleCount-1;0<i;i-=2)for(6==i&&i--;;){for(var g=0;2>g;g++)if(null==this.modules[b][i-g]){var n=!1;f<a.length&&(n=1==(a[f]>>>e&1));j.getMask(c,b,i-g)&&(n=!n);this.modules[b][i-g]=n;e--; -1==e&&(f++,e=7)}b+=d;if(0>b||this.moduleCount<=b){b-=d;d=-d;break}}}};o.PAD0=236;o.PAD1=17;o.createData=function(a,c,d){for(var c=p.getRSBlocks(a,
  c),b=new t,e=0;e<d.length;e++){var f=d[e];b.put(f.mode,4);b.put(f.getLength(),j.getLengthInBits(f.mode,a));f.write(b)}for(e=a=0;e<c.length;e++)a+=c[e].dataCount;if(b.getLengthInBits()>8*a)throw Error("code length overflow. ("+b.getLengthInBits()+">"+8*a+")");for(b.getLengthInBits()+4<=8*a&&b.put(0,4);0!=b.getLengthInBits()%8;)b.putBit(!1);for(;!(b.getLengthInBits()>=8*a);){b.put(o.PAD0,8);if(b.getLengthInBits()>=8*a)break;b.put(o.PAD1,8)}return o.createBytes(b,c)};o.createBytes=function(a,c){for(var d=
  0,b=0,e=0,f=Array(c.length),i=Array(c.length),g=0;g<c.length;g++){var n=c[g].dataCount,h=c[g].totalCount-n,b=Math.max(b,n),e=Math.max(e,h);f[g]=Array(n);for(var k=0;k<f[g].length;k++)f[g][k]=255&a.buffer[k+d];d+=n;k=j.getErrorCorrectPolynomial(h);n=(new q(f[g],k.getLength()-1)).mod(k);i[g]=Array(k.getLength()-1);for(k=0;k<i[g].length;k++)h=k+n.getLength()-i[g].length,i[g][k]=0<=h?n.get(h):0}for(k=g=0;k<c.length;k++)g+=c[k].totalCount;d=Array(g);for(k=n=0;k<b;k++)for(g=0;g<c.length;g++)k<f[g].length&&
  (d[n++]=f[g][k]);for(k=0;k<e;k++)for(g=0;g<c.length;g++)k<i[g].length&&(d[n++]=i[g][k]);return d};s=4;for(var j={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,
  78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var c=a<<10;0<=j.getBCHDigit(c)-j.getBCHDigit(j.G15);)c^=j.G15<<j.getBCHDigit(c)-j.getBCHDigit(j.G15);return(a<<10|c)^j.G15_MASK},getBCHTypeNumber:function(a){for(var c=a<<12;0<=j.getBCHDigit(c)-
  j.getBCHDigit(j.G18);)c^=j.G18<<j.getBCHDigit(c)-j.getBCHDigit(j.G18);return a<<12|c},getBCHDigit:function(a){for(var c=0;0!=a;)c++,a>>>=1;return c},getPatternPosition:function(a){return j.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,c,d){switch(a){case 0:return 0==(c+d)%2;case 1:return 0==c%2;case 2:return 0==d%3;case 3:return 0==(c+d)%3;case 4:return 0==(Math.floor(c/2)+Math.floor(d/3))%2;case 5:return 0==c*d%2+c*d%3;case 6:return 0==(c*d%2+c*d%3)%2;case 7:return 0==(c*d%3+(c+d)%2)%2;default:throw Error("bad maskPattern:"+
  a);}},getErrorCorrectPolynomial:function(a){for(var c=new q([1],0),d=0;d<a;d++)c=c.multiply(new q([1,l.gexp(d)],0));return c},getLengthInBits:function(a,c){if(1<=c&&10>c)switch(a){case 1:return 10;case 2:return 9;case s:return 8;case 8:return 8;default:throw Error("mode:"+a);}else if(27>c)switch(a){case 1:return 12;case 2:return 11;case s:return 16;case 8:return 10;default:throw Error("mode:"+a);}else if(41>c)switch(a){case 1:return 14;case 2:return 13;case s:return 16;case 8:return 12;default:throw Error("mode:"+
  a);}else throw Error("type:"+c);},getLostPoint:function(a){for(var c=a.getModuleCount(),d=0,b=0;b<c;b++)for(var e=0;e<c;e++){for(var f=0,i=a.isDark(b,e),g=-1;1>=g;g++)if(!(0>b+g||c<=b+g))for(var h=-1;1>=h;h++)0>e+h||c<=e+h||0==g&&0==h||i==a.isDark(b+g,e+h)&&f++;5<f&&(d+=3+f-5)}for(b=0;b<c-1;b++)for(e=0;e<c-1;e++)if(f=0,a.isDark(b,e)&&f++,a.isDark(b+1,e)&&f++,a.isDark(b,e+1)&&f++,a.isDark(b+1,e+1)&&f++,0==f||4==f)d+=3;for(b=0;b<c;b++)for(e=0;e<c-6;e++)a.isDark(b,e)&&!a.isDark(b,e+1)&&a.isDark(b,e+
  2)&&a.isDark(b,e+3)&&a.isDark(b,e+4)&&!a.isDark(b,e+5)&&a.isDark(b,e+6)&&(d+=40);for(e=0;e<c;e++)for(b=0;b<c-6;b++)a.isDark(b,e)&&!a.isDark(b+1,e)&&a.isDark(b+2,e)&&a.isDark(b+3,e)&&a.isDark(b+4,e)&&!a.isDark(b+5,e)&&a.isDark(b+6,e)&&(d+=40);for(e=f=0;e<c;e++)for(b=0;b<c;b++)a.isDark(b,e)&&f++;a=Math.abs(100*f/c/c-50)/5;return d+10*a}},l={glog:function(a){if(1>a)throw Error("glog("+a+")");return l.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;256<=a;)a-=255;return l.EXP_TABLE[a]},EXP_TABLE:Array(256),
  LOG_TABLE:Array(256)},m=0;8>m;m++)l.EXP_TABLE[m]=1<<m;for(m=8;256>m;m++)l.EXP_TABLE[m]=l.EXP_TABLE[m-4]^l.EXP_TABLE[m-5]^l.EXP_TABLE[m-6]^l.EXP_TABLE[m-8];for(m=0;255>m;m++)l.LOG_TABLE[l.EXP_TABLE[m]]=m;q.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var c=Array(this.getLength()+a.getLength()-1),d=0;d<this.getLength();d++)for(var b=0;b<a.getLength();b++)c[d+b]^=l.gexp(l.glog(this.get(d))+l.glog(a.get(b)));return new q(c,0)},mod:function(a){if(0>
  this.getLength()-a.getLength())return this;for(var c=l.glog(this.get(0))-l.glog(a.get(0)),d=Array(this.getLength()),b=0;b<this.getLength();b++)d[b]=this.get(b);for(b=0;b<a.getLength();b++)d[b]^=l.gexp(l.glog(a.get(b))+c);return(new q(d,0)).mod(a)}};p.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],
  [4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,
  116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,
  43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,
  3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,
  55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,
  45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];p.getRSBlocks=function(a,c){var d=p.getRsBlockTable(a,c);if(void 0==d)throw Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+c);for(var b=d.length/3,e=[],f=0;f<b;f++)for(var h=d[3*f+0],g=d[3*f+1],j=d[3*f+2],l=0;l<h;l++)e.push(new p(g,j));return e};p.getRsBlockTable=function(a,c){switch(c){case 1:return p.RS_BLOCK_TABLE[4*(a-1)+0];case 0:return p.RS_BLOCK_TABLE[4*(a-1)+1];case 3:return p.RS_BLOCK_TABLE[4*
  (a-1)+2];case 2:return p.RS_BLOCK_TABLE[4*(a-1)+3]}};t.prototype={get:function(a){return 1==(this.buffer[Math.floor(a/8)]>>>7-a%8&1)},put:function(a,c){for(var d=0;d<c;d++)this.putBit(1==(a>>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);a&&(this.buffer[c]|=128>>>this.length%8);this.length++}};"string"===typeof h&&(h={text:h});h=r.extend({},{render:"canvas",width:256,height:256,typeNumber:-1,
  correctLevel:2,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f<a.getModuleCount();f++)for(var i=0;i<a.getModuleCount();i++){d.fillStyle=a.isDark(f,i)?h.foreground:h.background;var g=Math.ceil((i+1)*b)-Math.floor(i*b),
  j=Math.ceil((f+1)*b)-Math.floor(f*b);d.fillRect(Math.round(i*b),Math.round(f*e),g,j)}}else{a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();c=r("<table></table>").css("width",h.width+"px").css("height",h.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",h.background);d=h.width/a.getModuleCount();b=h.height/a.getModuleCount();for(e=0;e<a.getModuleCount();e++){f=r("<tr></tr>").css("height",b+"px").appendTo(c);for(i=0;i<a.getModuleCount();i++)r("<td></td>").css("width",
  d+"px").css("background-color",a.isDark(e,i)?h.foreground:h.background).appendTo(f)}}a=c;jQuery(a).appendTo(this)})}})(jQuery);
  

});
/*!community/modules/common/share/main.js*/
;/**
 * 问答社区-分享弹窗
 * 在要添加分享弹窗的标签上添加类名 share_popup_btn ,并且添加自定义属性data-share-url="xxx" 即可使用
 * 
 * @author fridayhu@lagou.com
 *
 * @require "community/modules/common/share/main.less"
 * 
 */

define('community/modules/common/share/main', ['require', 'exports', 'module', 'dep/jquery-qrcode/jquery.qrcode.min', 'community/modules/common/main', 'dep/artTemplate/dist/template'], function(require, exports, module) {

	require('dep/jquery-qrcode/jquery.qrcode.min');
	var config = require('community/modules/common/main').config,
		helper = require('community/modules/common/main').helper;
	var template = require('dep/artTemplate/dist/template');

	$('body').on('click', '.share_popup_btn', function(e) {
		if ($('.share_popup_box').size() < 1) {
			var htmlStr = [
				'	<div class="share_popup_box animated" id="sharePopupBox">',
				'		<div class="popup_box_wrap">',
				'			<div class="wechat_box">',
				'				<div class="qrcode_box"></div>',
				'				<p class="tips"> <i>微信</i>',
				'					扫一扫分享到微信',
				'				</p>',
				'			</div>',
				'			<span class="deck_out"></span>',
				'			<span class="deck_in"></span>',
				'		</div>',
				'	</div>'
			].join('');
			$('body').append(htmlStr);
			$('#sharePopupBox').click(function(e) {
				e.stopPropagation();
			});
		}
		$('#sharePopupBox').css({
			top: $(this).offset().top + $(this).innerHeight() + 12,
			left: $(this).offset().left - $('#sharePopupBox').innerWidth() / 2 - 3 + $(this).innerWidth() / 2
		});
		flushQrCode($(this).attr('data-share-url'));
		if ($('#sharePopupBox:visible').size() > 0) {
			$('#sharePopupBox').hide(0).show(0).removeClass('fadeOutDown').addClass('fadeInUp');
		} else {
			$('#sharePopupBox').show(0).removeClass('fadeOutDown').addClass('fadeInUp');
		}
		e.stopPropagation();
	});

	$('body').click(function() {
		$('#sharePopupBox').removeClass('fadeInUp').addClass('fadeOutDown').delay(500).hide(0);
	});

	function flushQrCode(url) {
		if (!url) {
			return;
		}

		var fullUrl = $('<a href="' + url + '"></a>').prop('href');

		var qrCodeConfig = {
			width: 120,
			height: 120,
			text: fullUrl
		}

		var DEFAULT_VERSION = "8.0";
		var ua = navigator.userAgent.toLowerCase();
		var isIE = ua.indexOf("msie") > -1;
		if (isIE) {
			var ieVersion = ua.match(/msie ([\d.]+)/)[1];
			if (ieVersion <= DEFAULT_VERSION) {
				qrCodeConfig.render = 'table'
			}
		}

		$('#sharePopupBox .qrcode_box').empty();
		$('#sharePopupBox .qrcode_box').qrcode(qrCodeConfig);
	}

});

/*!community/modules/common/support-list-popup/main.js*/
;/**
 * 问答社区-答案-点赞的人弹窗
 * 在要添加提问弹窗的标签上添加类名 support_list_btn ,并且添加自定义属性data-answer-id="answerId" 即可使用
 * 
 * @author fridayhu@lagou.com
 *
 * jquery-colorbox
 * @require "common/components/jquery-colorbox-custom/jquery-colorbox.css"
 *
 * @require "community/modules/common/support-list-popup/main.less"
 * 
 */

define('community/modules/common/support-list-popup/main', ['require', 'exports', 'module', 'dep/jquery-colorbox/jquery.colorbox', 'community/modules/common/main', 'dep/artTemplate/dist/template'], function(require, exports, module) {

	require('dep/jquery-colorbox/jquery.colorbox');
	var config = require('community/modules/common/main').config,
		helper = require('community/modules/common/main').helper;
	var template = require('dep/artTemplate/dist/template');

	// 初始化
	(function init() {
		$('#supportListPopupWrap').size() < 1 && $('body').append('<div class="support_list_popup_wrap" id="supportListPopupWrap"></div>');
		$('#supportListPopupWrap').append('<div class="support_list_popup_box" id="supportListPopupBox"><div class="support_list"><ul></ul></div></div>');

		// 绑定弹窗
		$('body').on('click', '.support_list_btn', function(e) {
			// if (!helper.checkUserStatus()) {
			// 	return;
			// }
			supportListPopup($(this).attr('data-answer-id'));
		});

	})();

	var supportListPageNum = 1,
		supportListPageSize = 10,
		hasMoreSupportUsers = true,
		supportLoadingHtml = '<div class="loading2">Loading...</div>';
	var isLoadingSupportList = false,
		isLoadingMoreSupportUsers = false;

	// 赞过的人弹窗
	function supportListPopup(answerId) {
		if (isLoadingSupportList) {
			return;
		}
		supportListPageNum = 1;
		hasMoreSupportUsers = true;
		isLoadingSupportList = true;
		helper.ajax({
			url: config.url.getStarUserList,
			data: {
				answerId: answerId,
				pageNo: supportListPageNum,
				pageSize: supportListPageSize
			}
		}).done(function(data) {
			if (data.state == 1 && data.content.data) {
				supportList = data.content.data.starUserList;
				var tpl = "{{each supportList as user index}}\n<li>\n\t<div class=\"avatar fl\">\n        <a href=\"{{FE_zbase}}/user/userIndex-{{user.id}}.html\" target=\"_blank\">\n            {{if user.portrait && user.portrait != ''}}\n            <img src=\"{{FE_lgsbase}}/{{user.portrait}}\" width=\"40\" height=\"40\" alt=\"{{user.userName}}\" />\n            {{else}}\n            <img src=\"//www.lgstatic.com/lg-community-fed/community/modules/common/img/avatar_default_7225407.png\" width=\"40\" height=\"40\" alt=\"{{user.userName}}\" />\n            {{/if}}\n        </a>\n    </div>\n\t<p><a href=\"{{FE_zbase}}/user/userIndex-{{user.id}}.html\" target=\"_blank\"><span class=\"user_name\">{{user.userName}}</span></a>&nbsp; <a href=\"{{FE_zbase}}/user/userIndex-{{user.id}}.html\" target=\"_blank\"><span class=\"user_position\">{{user.positionName}}</span></a></p>\n\t<p><a href=\"{{FE_zbase}}/user/userIndex-{{user.id}}.html\" target=\"_blank\"><span class=\"user_introduce\">{{user.introduce}}</span></a></p>\n\t{{if user.isFollow}}\n\t<a class=\"user_follow_btn btn btn_cancel\" href=\"javascript:;\" data-user-id=\"{{user.id}}\">已关注</a>\n\t{{else}}\n\t<a class=\"user_follow_btn btn\" href=\"javascript:;\" data-user-id=\"{{user.id}}\"><i>加</i>关注</a>\n\t{{/if}}\n</li>\n{{/each}}\n";
				var htmlStr = template.compile(tpl)({
					supportList: supportList,
					FE_base: GLOBAL_DOMAIN.ctx,
					FE_zbase: GLOBAL_DOMAIN.zctx,
					FE_lgsbase: GLOBAL_DOMAIN.lgsctx,
					cdndomain: window.GLOBAL_CDN_DOMAIN
				});
				$('#supportListPopupBox .support_list ul').html(htmlStr);

				$.colorbox({
					inline: true,
					href: $("#supportListPopupBox"),
					title: "赞过的人"
				});

				// 滚动加载
				$('#supportListPopupBox .support_list').scroll(function() {
					if (isLoadingMoreSupportUsers || $('#supportListPopupBox .support_list:visible').size() < 1) {
						return;
					}
					var curHeight = $('#supportListPopupBox .support_list').scrollTop() + $('#supportListPopupBox .support_list').height();
					if (curHeight >= $('#supportListPopupBox .support_list:visible').get(0).scrollHeight) {
						getMoreSupportUsers(answerId);
					}
				});

			} else {
				console.log(data.message);
			}
		}).fail(function() {
			console.log('getStarUserList error');
		}).always(function() {
			isLoadingSupportList = false;
		});
	}

	// 加载更多赞过的人
	function getMoreSupportUsers(answerId) {
		if (isLoadingMoreSupportUsers || !hasMoreSupportUsers) {
			return;
		}
		var $supportLoadingHtml = $(supportLoadingHtml).show();
		$('#supportListPopupBox .support_list ul').after($supportLoadingHtml);
		isLoadingMoreSupportUsers = true;
		helper.ajax({
			url: config.url.getStarUserList,
			data: {
				answerId: answerId,
				pageNo: supportListPageNum + 1,
				pageSize: supportListPageSize
			}
		}).done(function(data) {
			if (data.state == 1 && data.content.data) {
				supportList = data.content.data.starUserList;
				if (supportList && supportList.length > 1) {
					supportListPageNum += 1;
					var tpl = "{{each supportList as user index}}\n<li>\n\t<div class=\"avatar fl\">\n        <a href=\"{{FE_zbase}}/user/userIndex-{{user.id}}.html\" target=\"_blank\">\n            {{if user.portrait && user.portrait != ''}}\n            <img src=\"{{FE_lgsbase}}/{{user.portrait}}\" width=\"40\" height=\"40\" alt=\"{{user.userName}}\" />\n            {{else}}\n            <img src=\"//www.lgstatic.com/lg-community-fed/community/modules/common/img/avatar_default_7225407.png\" width=\"40\" height=\"40\" alt=\"{{user.userName}}\" />\n            {{/if}}\n        </a>\n    </div>\n\t<p><a href=\"{{FE_zbase}}/user/userIndex-{{user.id}}.html\" target=\"_blank\"><span class=\"user_name\">{{user.userName}}</span></a>&nbsp; <a href=\"{{FE_zbase}}/user/userIndex-{{user.id}}.html\" target=\"_blank\"><span class=\"user_position\">{{user.positionName}}</span></a></p>\n\t<p><a href=\"{{FE_zbase}}/user/userIndex-{{user.id}}.html\" target=\"_blank\"><span class=\"user_introduce\">{{user.introduce}}</span></a></p>\n\t{{if user.isFollow}}\n\t<a class=\"user_follow_btn btn btn_cancel\" href=\"javascript:;\" data-user-id=\"{{user.id}}\">已关注</a>\n\t{{else}}\n\t<a class=\"user_follow_btn btn\" href=\"javascript:;\" data-user-id=\"{{user.id}}\"><i>加</i>关注</a>\n\t{{/if}}\n</li>\n{{/each}}\n";
					var htmlStr = template.compile(tpl)({
						supportList: supportList,
						FE_base: GLOBAL_DOMAIN.ctx,
						FE_zbase: GLOBAL_DOMAIN.zctx,
						FE_lgsbase: GLOBAL_DOMAIN.lgsctx,
						cdndomain: window.GLOBAL_CDN_DOMAIN
					});
					$('#supportListPopupBox .support_list ul').append(htmlStr);
				} else {
					hasMoreSupportUsers = false;
				}
			} else {
				console.log(data.message);
			}
		}).fail(function() {
			console.log('getStarUserList error');
		}).always(function() {
			isLoadingMoreSupportUsers = false;
			$supportLoadingHtml.remove();
		});
	}

	// 关注
	var followLoadingHtml = '<div class="loading2">Loading...</div>';
	$('#supportListPopupBox').on('click', '.user_follow_btn', function(e) {
		var $this = $(this);
		if ($this.data('isLoading')) {
			return;
		}
		var userId = $this.attr('data-user-id');
		var originHtml = $this.html();
		$this.html(followLoadingHtml);
		$this.data('isLoading', true);
		if ($this.hasClass('btn_cancel')) {
			// 取消关注
			helper.cancelFollowUser(userId, {
				done: function(data) {
					$this.removeClass('btn_cancel').html('<i>加</i>关注');
				},
				fail: function() {
					$this.html(originHtml);
				},
				always: function() {
					$this.removeData('isLoading');
				}
			});
		} else {
			// 关注
			helper.followUser(userId, {
				done: function(data) {
					$this.addClass('btn_cancel').html('已关注');
				},
				fail: function() {
					$this.html(originHtml);
				},
				always: function() {
					$this.removeData('isLoading');
				}
			});
		}
	});
	$('#supportListPopupBox').on('mouseenter', '.user_follow_btn.btn_cancel', function(e) {
		$(this).html('取消');
	});
	$('#supportListPopupBox').on('mouseleave', '.user_follow_btn.btn_cancel', function(e) {
		$(this).html('已关注');
	});

});

/*!community/modules/index/news/main.js*/
;/**
 * 问答社区-首页-最新动态
 * 
 * @author fridayhu@lagou.com
 * 
 */
define('community/modules/index/news/main', ['require', 'exports', 'module', 'community/modules/common/main', 'dep/artTemplate/dist/template', 'dep/jQuery.dotdotdot/src/jquery.dotdotdot', 'community/modules/common/user-card-float/main', 'community/modules/common/share/main', 'community/modules/common/support-list-popup/main'], function(require, exports, module) {

	var config = require('community/modules/common/main').config,
		helper = require('community/modules/common/main').helper;
	var template = require('dep/artTemplate/dist/template');
	require('dep/jQuery.dotdotdot/src/jquery.dotdotdot');
	require('community/modules/common/user-card-float/main');
	require('community/modules/common/share/main');

	// 首屏展示
	$('#news .news_list .item_question, #news .news_list .item_question_desc').dotdotdot();
	$('#news .news_list .answer_summary').dotdotdot({
		after: 'a.expand_answer',
		callback: function(isTruncated, orgContent) {
			if (isTruncated) {
				// $(orgContent.context).find('a.expand_answer').show();
			}
		}
	});

	// 展开收起
	$('#news .news_list').on('click', '.answer_thumbnail_box, .answer_summary', function(e) {
		var $this = $(this),
			$contentBox = $this.parent('.item_content');
		// $contentBox.parent('.news_answer').find('.item_header').hide();
		$contentBox.find('.answer_thumbnail_box, .answer_summary').hide();
		if ($contentBox.find('.answer_full_content').size() < 1) {
			var $answerFullContent = $('<div class="answer_full_content editor_parse"></div>');
			$answerFullContent.append($contentBox.find('.answer_html').val());
			$contentBox.find('.answer_full').append($answerFullContent);
		}
		$contentBox.find('.answer_full').show();
		var answerTime = $contentBox.parent('.news_answer').find('.item_header .item_time').attr('data-answer-time') || $contentBox.parent('.news_answer').find('.item_header .item_time').text();
		$contentBox.find('.item_status').prepend('<span class="status_item answer_full_time">发布于' + answerTime + '</span>').append('<a class="fold_answer fr" href="javascript:;">收起<i class="icon_fold"></i></a>');
	});
	$('#news .news_list').on('click', '.fold_answer', function(e) {
		var $this = $(this),
			$contentBox = $this.parent().parent('.item_content');
		$contentBox.find('.answer_full').hide();
		// $contentBox.parent('.news_answer').find('.item_header').show();
		$contentBox.find('.answer_thumbnail_box, .answer_summary').show();
		$contentBox.find('.item_status .answer_full_time').remove();
		$contentBox.find('.item_status .fold_answer').remove();
		var answerTop = $contentBox.parent('.news_answer').find('.item_header').offset().top;
		if ($('html').get(0).scrollTop > answerTop || $('body').get(0).scrollTop > answerTop) {
			$('html, body').animate({
				scrollTop: answerTop
			}, 200);
		}
	});
	/*$('#news .news_list').on('click', '.answer_full', function(e) {
		var $this = $(this),
			$contentBox = $this.parent('.item_content');
		$this.hide();
		$contentBox.find('.answer_thumbnail_box, .answer_summary').show();
	});*/

	// 赞
	// var supportLoadingHtml = '<div class="loading2">Loading...</div>';
	$('#news .news_list').on('click', '.news_answer .support_bar a', function(e) {
		var $this = $(this);
		if ($this.data('isLoading')) {
			return;
		}
		var answerId = $this.attr('data-answer-id');
		var originHtml = $this.find('.support_num').html();
		// $this.find('.support_num').html(supportLoadingHtml);
		$this.data('isLoading', true);
		if ($this.hasClass('has_support')) {
			// 取消赞
			helper.cancelSupportAnswer(answerId, {
				done: function(data) {
					$this.removeClass('has_support');
					$('#news .news_answer .support_bar a[data-answer-id=' + answerId + ']').removeClass('has_support');
					$this.find('.support_num').html(data.content.data.starCount);
					$('#news .news_answer .support_bar a[data-answer-id=' + answerId + ']').find('.support_num').html(data.content.data.starCount);
				},
				fail: function() {
					$this.find('.support_num').html(originHtml);
				},
				always: function() {
					$this.removeData('isLoading');
				}
			});
		} else {
			// 赞
			helper.supportAnswer(answerId, {
				done: function(data) {
					$this.addClass('has_support');
					$('#news .news_answer .support_bar a[data-answer-id=' + answerId + ']').addClass('has_support');
					$this.find('.support_num').html(data.content.data.starCount);
					$('#news .news_answer .support_bar a[data-answer-id=' + answerId + ']').find('.support_num').html(data.content.data.starCount);
				},
				fail: function() {
					$this.find('.support_num').html(originHtml);
				},
				always: function() {
					$this.removeData('isLoading');
				}
			});
		}
	});

	// 动态tab切换
	$('#newsTab').on('click', 'li', function(e) {
		$(this).addClass('current').siblings('li').removeClass('current');
		var $curNewsList = $('#news .news_list[data-news-category=' + $(this).attr('data-news-category') + ']');
		$curNewsList.addClass('current').siblings('.news_list').removeClass('current');
		if ($curNewsList.children('.list').find('li').size() < 1) {
			$curNewsList.find('.news_more').size() < 1 && $curNewsList.append('<a class="news_more btn btn_invert" href="javascript:;">查看更多</a>');
			$curNewsList.find('.news_more').click();
		}
	});

	// 加载更多
	var newsMoreSetting = {
		RECOMMEND: {
			pageNum: 0,
			pageSize: 10
		},
		INDEX: {
			pageNum: 0,
			pageSize: 10
		}
	};
	var defaultNewsCategory = $('#newsTab li.current').attr('data-news-category');
	newsMoreSetting[defaultNewsCategory].pageNum += 1;

	$('.news_list').on('click', '.news_more', getMoreNews);

	var isLoadingNews = false,
		newsMoreLoadingHtml = [
			'	<div class="loading1 news_loding">',
			'		<div class="rect1">L</div>',
			'		<div class="rect2">o</div>',
			'		<div class="rect3">a</div>',
			'		<div class="rect4">d</div>',
			'		<div class="rect5">ing</div>',
			'	</div>'
		].join('');

	function getMoreNews() {

		if (isLoadingNews) {
			return;
		}

		isLoadingNews = true;
		var targetNewsCategory = $('#newsTab li.current').attr('data-news-category');
		var $targetNewsList = $('#news .news_list[data-news-category=' + targetNewsCategory + ']');

		$targetNewsList.find('.news_more').addClass('btn_disable').hide();
		if ($targetNewsList.find('.news_loding').size() < 1) {
			$targetNewsList.find('.news_more').after(newsMoreLoadingHtml);
		}
		$targetNewsList.find('.news_loding').show();
		helper.ajax({
			url: config.indexURL.getMoreNews,
			data: {
				type: targetNewsCategory,
				pageNo: newsMoreSetting[targetNewsCategory].pageNum + 1,
				pageSize: newsMoreSetting[targetNewsCategory].pageSize
			}
		}).done(function(data) {
			if (data.state == 1 && data.content.data) {
				newsMoreSetting[targetNewsCategory].pageNum += 1;
				var tpl = "{{if newsList}}\n\t{{each newsList as item index}}\n\t\t{{if item.type == 'ATTENTION_QUESTION'}}\n\t\t<li class=\"list_more\">\n\t\t\t<div class=\"news_question item\">\n\t\t\t\t<div class=\"item_header\">\n\t\t\t\t\t<div class=\"follower_avatar\">\n\t\t\t\t\t\t{{if item.news.attentionUserList[0].portrait && item.news.attentionUserList[0].portrait !=''}}\n\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{item.news.attentionUserList[0].id}}.html\" target=\"_blank\"><img src=\"{{FE_lgsbase}}/{{item.news.attentionUserList[0].portrait}}\" width=\"44\" height=\"44\" alt=\"{{item.news.attentionUserList[0].userName}}\" /></a>\n\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{item.news.attentionUserList[0].id}}.html\" target=\"_blank\"><img src=\"//www.lgstatic.com/lg-community-fed/community/modules/common/img/avatar_default_7225407.png\" width=\"44\" height=\"44\" alt=\"{{item.news.attentionUserList[0].userName}}\" /></a>\n\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t</div>\n\t\t\t\t\t{{each item.news.attentionUserList as follower followerIndex}}\n\t\t\t\t\t<strong class=\"follower_name user_card_float_wrap\">\n\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{follower.id}}.html\" target=\"_blank\">{{follower.userName}}</a>\n\t\t\t\t\t\t<span style=\"display: none;\">{{userinfoFloat = follower}}</span>\n\t\t\t\t\t\t<!--\n    问答社区-浮动用户卡片 arttemplate模板\n-->\n\n<div class=\"user_card_float\">\n    <div class=\"user_card_float_box\">\n        <div class=\"avatar fl\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.portrait && userinfoFloat.portrait != ''}}\n                <img src=\"{{FE_lgsbase}}/{{userinfoFloat.portrait}}\" width=\"54\" height=\"54\" />\n                {{else}}\n                <img src=\"../img/avatar_default.png\" width=\"54\" height=\"54\" />\n                {{/if}}\n            </a>\n        </div>\n        <div class=\"userinfo_base\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.userName.length > 15}}\n                <span>{{userinfoFloat.userName.substring(0,14)}}...</span>\n                {{else}}\n                <span>{{userinfoFloat.userName}}</span>\n                {{/if}}\n                {{if userinfoFloat.sex == 'MALE'}}\n                <i class=\"boy\">男</i>\n                {{else if userinfoFloat.sex == 'FEMALE'}}\n                <i class=\"girl\">女</i>\n                {{/if}}\n            </a>\n        </div>\n        {{if userinfoFloat.id == curUserid}}\n        <!-- <a class=\"userinfo_edit\" href=\"javascript:;\">编辑</a> -->\n        {{/if}}\n        <p class=\"userinfo_job\" title=\"{{userinfoFloat.positionName}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.positionName}}</a></p>\n        <p class=\"userinfo_intro\" title=\"{{userinfoFloat.introduce}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.introduce}}</a></p>\n        <div class=\"user_status\">\n            <ul class=\"clearfix\">\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=QUESTION\" target=\"_blank\"><em>{{userinfoFloat.questionNum}}</em>提问</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.answerNum}}</em>回答</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.gainStarNum}}</em>获赞</a></li>\n            </ul>\n        </div>\n        {{if userinfoFloat.isFollow && userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn btn_cancel\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\">已关注</a>\n        {{else if userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\"><i>加</i>关注</a>\n        {{/if}}\n        <span class=\"deck_out\"></span>\n        <span class=\"deck_in\"></span>\n    </div>\n</div>\n\n\t\t\t\t\t</strong>\n\t\t\t\t\t{{/each}}\n\t\t\t\t\t关注了\n\t\t\t\t\t<span class=\"item_time fr\">{{item.news.time}}</span>\n\t\t\t\t</div>\n\t\t\t\t<h4 class=\"item_question question_name\" data-question-id=\"{{item.news.questionId}}\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\">{{item.news.questionTitle}}</a></h4>\n\t\t\t\t{{if item.news.questionContent}}\n\t\t\t\t<p class=\"item_question_desc\" data-question-id=\"{{item.news.questionId}}\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\">{{#item.news.questionContent}}</a></p>\n\t\t\t\t{{/if}}\n\t\t\t\t<div class=\"item_content clearfix\">\n\t\t\t\t\t<div class=\"item_status status_bar\">\n\t\t\t\t\t\t<span class=\"status_item\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\"><em class=\"answer_num highlight\">{{item.news.answerNum}}</em>个回答</a></span>\n\t\t\t\t\t\t<span class=\"status_item\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\"><em class=\"follow_num highlight\">{{item.news.attentionNum}}</em>人关注</a></span>\n\t\t\t\t\t\t<!-- <span class=\"status_item\">来自<em class=\"from\">{{if item.news.source == 'PC'}} lagou.com {{else if item.news.source == 'APP'}} 拉勾APP {{else}} lagou.com {{/if}}</em></span> -->\n\t\t\t\t\t\t<span class=\"status_item\"><a class=\"share_popup_btn\" href=\"javascript:;\" data-share-url=\"{{FE_zbase}}/share/question_{{item.news.questionId}}.html\" data-lg-tj-id=\"1EG0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\">分享</a></span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</li>\n\t\t{{else if item.type == 'QUESTION_ADD' && item.news.questionUser}}\n\t\t<li class=\"list_more\">\n\t\t\t<div class=\"news_question item\">\n\t\t\t\t<div class=\"item_header\">\n\t\t\t\t\t<div class=\"questioner_avatar\">\n\t\t\t\t\t\t{{if item.news.questionUser.portrait && item.news.questionUser.portrait !=''}}\n\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{item.news.questionUser.id}}.html\" target=\"_blank\"><img src=\"{{FE_lgsbase}}/{{item.news.questionUser.portrait}}\" width=\"44\" height=\"44\" alt=\"{{item.news.questionUser.userName}}\" /></a>\n\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{item.news.questionUser.id}}.html\" target=\"_blank\"><img src=\"//www.lgstatic.com/lg-community-fed/community/modules/common/img/avatar_default_7225407.png\" width=\"44\" height=\"44\" alt=\"{{item.news.questionUser.userName}}\" /></a>\n\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t</div>\n\t\t\t\t\t<strong class=\"questioner_name user_card_float_wrap\">\n\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{item.news.questionUser.id}}.html\" target=\"_blank\">{{item.news.questionUser.userName}}</a>\n\t\t\t\t\t\t<span style=\"display: none;\">{{userinfoFloat = item.news.questionUser}}</span>\n\t\t\t\t\t\t<!--\n    问答社区-浮动用户卡片 arttemplate模板\n-->\n\n<div class=\"user_card_float\">\n    <div class=\"user_card_float_box\">\n        <div class=\"avatar fl\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.portrait && userinfoFloat.portrait != ''}}\n                <img src=\"{{FE_lgsbase}}/{{userinfoFloat.portrait}}\" width=\"54\" height=\"54\" />\n                {{else}}\n                <img src=\"../img/avatar_default.png\" width=\"54\" height=\"54\" />\n                {{/if}}\n            </a>\n        </div>\n        <div class=\"userinfo_base\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.userName.length > 15}}\n                <span>{{userinfoFloat.userName.substring(0,14)}}...</span>\n                {{else}}\n                <span>{{userinfoFloat.userName}}</span>\n                {{/if}}\n                {{if userinfoFloat.sex == 'MALE'}}\n                <i class=\"boy\">男</i>\n                {{else if userinfoFloat.sex == 'FEMALE'}}\n                <i class=\"girl\">女</i>\n                {{/if}}\n            </a>\n        </div>\n        {{if userinfoFloat.id == curUserid}}\n        <!-- <a class=\"userinfo_edit\" href=\"javascript:;\">编辑</a> -->\n        {{/if}}\n        <p class=\"userinfo_job\" title=\"{{userinfoFloat.positionName}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.positionName}}</a></p>\n        <p class=\"userinfo_intro\" title=\"{{userinfoFloat.introduce}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.introduce}}</a></p>\n        <div class=\"user_status\">\n            <ul class=\"clearfix\">\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=QUESTION\" target=\"_blank\"><em>{{userinfoFloat.questionNum}}</em>提问</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.answerNum}}</em>回答</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.gainStarNum}}</em>获赞</a></li>\n            </ul>\n        </div>\n        {{if userinfoFloat.isFollow && userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn btn_cancel\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\">已关注</a>\n        {{else if userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\"><i>加</i>关注</a>\n        {{/if}}\n        <span class=\"deck_out\"></span>\n        <span class=\"deck_in\"></span>\n    </div>\n</div>\n\n\t\t\t\t\t</strong>\n\t\t\t\t\t提出一个新的问题\n\t\t\t\t\t<span class=\"item_time fr\">{{item.news.time}}</span>\n\t\t\t\t</div>\n\t\t\t\t<h4 class=\"item_question question_name\" data-question-id=\"{{item.news.questionId}}\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\">{{item.news.questionTitle}}</a></h4>\n\t\t\t\t{{if item.news.questionContent}}\n\t\t\t\t<p class=\"item_question_desc\" data-question-id=\"{{item.news.questionId}}\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\">{{#item.news.questionContent}}</a></p>\n\t\t\t\t{{/if}}\n\t\t\t\t<div class=\"item_content clearfix\">\n\t\t\t\t\t<div class=\"item_status status_bar\">\n\t\t\t\t\t\t<span class=\"status_item\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\"><em class=\"answer_num highlight\">{{item.news.answerNum}}</em>个回答</a></span>\n\t\t\t\t\t\t<span class=\"status_item\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\"><em class=\"follow_num highlight\">{{item.news.attentionNum}}</em>人关注</a></span>\n\t\t\t\t\t\t<!-- <span class=\"status_item\">来自<em class=\"from\">{{if item.news.source == 'PC'}} lagou.com {{else if item.news.source == 'APP'}} 拉勾APP {{else}} lagou.com {{/if}}</em></span> -->\n\t\t\t\t\t\t<span class=\"status_item\"><a class=\"share_popup_btn\" href=\"javascript:;\" data-share-url=\"{{FE_zbase}}/share/question_{{item.news.questionId}}.html\" data-lg-tj-id=\"1EG0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\">分享</a></span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</li>\n\t\t{{else if item.type == 'QUESTION_ADD'}}\n\t\t<li class=\"list_more\">\n\t\t\t<div class=\"news_question item\">\n\t\t\t\t<div class=\"item_header\">\n\t\t\t\t\t{{each item.news.topicList as topic topicIndex}}\n\t\t\t\t\t<strong class=\"topic_name topic_name_style_1\" data-topic-id=\"{{topic.topicId}}\"><a href=\"{{FE_zbase}}/topic/{{topic.topicId}}.html\" target=\"_blank\" data-lg-tj-id=\"1aC0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{topic.topicId}}\">{{topic.topicTitle}}</a></strong>\n\t\t\t\t\t{{/each}}\n\t\t\t\t\t收到一个新的问题\n\t\t\t\t\t<span class=\"item_time fr\">{{item.news.time}}</span>\n\t\t\t\t</div>\n\t\t\t\t<h4 class=\"item_question question_name\" data-question-id=\"{{item.news.questionId}}\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\" data-lg-tj-id=\"1aE0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\">{{item.news.questionTitle}}</a></h4>\n\t\t\t\t{{if item.news.questionContent}}\n\t\t\t\t<p class=\"item_question_desc\" data-question-id=\"{{item.news.questionId}}\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\">{{#item.news.questionContent}}</a></p>\n\t\t\t\t{{/if}}\n\t\t\t\t<div class=\"item_content clearfix\">\n\t\t\t\t\t<div class=\"item_status status_bar\">\n\t\t\t\t\t\t<span class=\"status_item\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\" data-lg-tj-id=\"1aF0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\"><em class=\"answer_num highlight\">{{item.news.answerNum}}</em>个回答</a></span>\n\t\t\t\t\t\t<span class=\"status_item\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\" data-lg-tj-id=\"1aG0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\"><em class=\"follow_num highlight\">{{item.news.attentionNum}}</em>人关注</a></span>\n\t\t\t\t\t\t<!-- <span class=\"status_item\">来自<em class=\"from\">{{if item.news.source == 'PC'}} lagou.com {{else if item.news.source == 'APP'}} 拉勾APP {{else}} lagou.com {{/if}}</em></span> -->\n\t\t\t\t\t\t<span class=\"status_item\"><a class=\"share_popup_btn\" href=\"javascript:;\" data-share-url=\"{{FE_zbase}}/share/question_{{item.news.questionId}}.html\" data-lg-tj-id=\"1EG0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\">分享</a></span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</li>\n\t\t{{else if item.type == 'ANSWER_ADD' && item.news.answerInfoList.length > 1}}\n\t\t<li class=\"list_more\">\n\t\t\t<div class=\"news_answer_list item clearfix\">\n\t\t\t\t<!-- <h4 class=\"item_question question_name\" data-question-id=\"{{item.news.questionId}}\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\">{{item.news.questionTitle}}</a></h4> -->\n\t\t\t\t<ul class=\"list\">\n\t\t\t\t\t{{each item.news.answerInfoList as answer answerIndex}}\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<div class=\"news_answer item\">\n\t\t\t\t\t\t\t<div class=\"item_header\">\n\t\t\t\t\t\t\t\t{{if answer.anonymous}}\n\t\t\t\t\t\t\t\t<div class=\"answerer_avatar\">\n\t\t\t\t\t\t\t\t\t<a class=\"anonymous\" href=\"javascript:;\"><img src=\"//www.lgstatic.com/lg-community-fed/community/modules/common/img/avatar_default_7225407.png\" width=\"44\" height=\"44\" alt=\"匿名用户\" /></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<strong class=\"answerer_name\">\n\t\t\t\t\t\t\t\t\t<a class=\"anonymous\" href=\"javascript:;\">匿名用户</a>\n\t\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t\t<span class=\"answerer_position\">可能来自遥远的阿贝尔2029星系群</span>\n\t\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t\t<div class=\"answerer_avatar\">\n\t\t\t\t\t\t\t\t\t{{if answer.answerUser.portrait && answer.answerUser.portrait !=''}}\n\t\t\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1aM0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerUser.id}}\"><img src=\"{{FE_lgsbase}}/{{answer.answerUser.portrait}}\" width=\"44\" height=\"44\" alt=\"{{answer.answerUser.userName}}\" /></a>\n\t\t\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1aM0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerUser.id}}\"><img src=\"//www.lgstatic.com/lg-community-fed/community/modules/common/img/avatar_default_7225407.png\" width=\"44\" height=\"44\" alt=\"{{answer.answerUser.userName}}\" /></a>\n\t\t\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<strong class=\"answerer_name user_card_float_wrap\">\n\t\t\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1aN0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerUser.id}}\">{{answer.answerUser.userName}}</a>\n\t\t\t\t\t\t\t\t\t<span style=\"display: none;\">{{userinfoFloat = answer.answerUser}}</span>\n\t\t\t\t\t\t\t\t\t<!--\n    问答社区-浮动用户卡片 arttemplate模板\n-->\n\n<div class=\"user_card_float\">\n    <div class=\"user_card_float_box\">\n        <div class=\"avatar fl\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.portrait && userinfoFloat.portrait != ''}}\n                <img src=\"{{FE_lgsbase}}/{{userinfoFloat.portrait}}\" width=\"54\" height=\"54\" />\n                {{else}}\n                <img src=\"../img/avatar_default.png\" width=\"54\" height=\"54\" />\n                {{/if}}\n            </a>\n        </div>\n        <div class=\"userinfo_base\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.userName.length > 15}}\n                <span>{{userinfoFloat.userName.substring(0,14)}}...</span>\n                {{else}}\n                <span>{{userinfoFloat.userName}}</span>\n                {{/if}}\n                {{if userinfoFloat.sex == 'MALE'}}\n                <i class=\"boy\">男</i>\n                {{else if userinfoFloat.sex == 'FEMALE'}}\n                <i class=\"girl\">女</i>\n                {{/if}}\n            </a>\n        </div>\n        {{if userinfoFloat.id == curUserid}}\n        <!-- <a class=\"userinfo_edit\" href=\"javascript:;\">编辑</a> -->\n        {{/if}}\n        <p class=\"userinfo_job\" title=\"{{userinfoFloat.positionName}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.positionName}}</a></p>\n        <p class=\"userinfo_intro\" title=\"{{userinfoFloat.introduce}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.introduce}}</a></p>\n        <div class=\"user_status\">\n            <ul class=\"clearfix\">\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=QUESTION\" target=\"_blank\"><em>{{userinfoFloat.questionNum}}</em>提问</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.answerNum}}</em>回答</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.gainStarNum}}</em>获赞</a></li>\n            </ul>\n        </div>\n        {{if userinfoFloat.isFollow && userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn btn_cancel\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\">已关注</a>\n        {{else if userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\"><i>加</i>关注</a>\n        {{/if}}\n        <span class=\"deck_out\"></span>\n        <span class=\"deck_in\"></span>\n    </div>\n</div>\n\n\t\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t\t<span class=\"answerer_position\">{{answer.answerUser.positionName}}</span>\n\t\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t\t回答了\n\t\t\t\t\t\t\t\t<span class=\"item_time fr\">{{answer.time}}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<h4 class=\"item_question question_name\" data-question-id=\"{{item.news.questionId}}\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\" data-lg-tj-id=\"1aV0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\">{{item.news.questionTitle}}</a></h4>\n\t\t\t\t\t\t\t<div class=\"item_content clearfix\">\n\t\t\t\t\t\t\t\t<div class=\"support_bar\">\n\t\t\t\t\t\t\t\t\t<a class=\"{{if answer.isStar}} has_support {{/if}}\" href=\"javascript:;\" data-answer-id=\"{{answer.answerId}}\" data-lg-tj-id=\"1aO0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">\n\t\t\t\t\t\t\t\t\t\t<i class=\"support_btn icon-glyph-like\"></i>\n\t\t\t\t\t\t\t\t\t\t<strong class=\"support_num\">{{answer.starNum}}</strong>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{{if answer.thumbnail && answer.thumbnail != ''}}\n\t\t\t\t\t\t\t\t<a class=\"answer_thumbnail_box fl\" href=\"javascript:;\" data-lg-tj-id=\"1aP0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\"><img class=\"answer_thumbnail\" src=\"{{answer.thumbnail.replace(/^https?\\:\\/\\/www\\.lagou\\.com/i, FE_lgsbase)}}\" /></a>\n\t\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t\t<p class=\"answer_summary\" data-lg-tj-id=\"1aQ0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">\n\t\t\t\t\t\t\t\t\t{{answer.summary}}\n\t\t\t\t\t\t\t\t\t<a class=\"expand_answer\" href=\"javascript:;\" data-lg-tj-id=\"1aR0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">展开<i class=\"icon_expand\"></i></a>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<textarea class=\"answer_html\">{{#answer.answerContent}}</textarea>\n\t\t\t\t\t\t\t\t<div class=\"answer_full\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"item_status status_bar\">\n\t\t\t\t\t\t\t\t\t<span class=\"status_item\"><a href=\"{{FE_zbase}}/answer/{{answer.answerId}}.html\" target=\"_blank\" data-lg-tj-id=\"1aS0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\"><em class=\"comment_num highlight\">{{answer.commentNum}}</em>条评论</a></span>\n\t\t\t\t\t\t\t\t\t<!-- <span class=\"status_item\">来自<em class=\"from\">{{if item.news.source == 'PC'}} lagou.com {{else if item.news.source == 'APP'}} 拉勾APP {{else}} lagou.com {{/if}}</em></span> -->\n\t\t\t\t\t\t\t\t\t{{if answer.starUserList && answer.starUserList.length > 0}}\n\t\t\t\t\t\t\t\t\t<span class=\"status_item\">{{each answer.starUserList as supportUser supportUserIndex}}<a href=\"{{FE_zbase}}/user/userIndex-{{supportUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1aT0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{supportUser.id}}\">{{supportUser.userName}}</a>{{if supportUserIndex + 1 < answer.starUserList.length}}、{{/if}}{{/each}}{{if answer.starTrueNum > 3}}等<a class=\"support_list_btn\" href=\"javascript:;\" data-answer-id=\"{{answer.answerId}}\" data-lg-tj-id=\"1e90\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\"><em class=\"support_num highlight\">{{answer.starNum}}</em>人赞过</a>{{else}}赞过{{/if}}</span>\n\t\t\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t\t\t<span class=\"status_item\"><a class=\"share_popup_btn\" href=\"javascript:;\" data-share-url=\"{{FE_zbase}}/share/answer_{{answer.answerId}}.html\" data-lg-tj-id=\"1EH0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">分享</a></span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</li>\n\t\t\t\t\t{{/each}}\n\t\t\t\t</ul>\n\t\t\t\t<a class=\"more_answer fr\" href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\" data-lg-tj-id=\"1aU0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\">查看全部<span class=\"answer_num\">{{item.news.answerNum}}</span>个回答</a>\n\t\t\t</div>\n\t\t</li>\n\t\t{{else if item.type == 'ANSWER_ADD'}}\n\t\t\t{{each item.news.answerInfoList as answer answerIndex}}\n\t\t\t<li class=\"list_more\">\n\t\t\t\t<div class=\"news_answer item\">\n\t\t\t\t\t<div class=\"item_header\">\n\t\t\t\t\t\t{{if answer.anonymous}}\n\t\t\t\t\t\t<div class=\"answerer_avatar\">\n\t\t\t\t\t\t\t<a class=\"anonymous\" href=\"javascript:;\"><img src=\"//www.lgstatic.com/lg-community-fed/community/modules/common/img/avatar_default_7225407.png\" width=\"44\" height=\"44\" alt=\"匿名用户\" /></a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<strong class=\"answerer_name user_card_float_wrap\">\n\t\t\t\t\t\t\t<a class=\"anonymous\" href=\"javascript:;\">匿名用户</a>\n\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t<span class=\"answerer_position\">可能来自遥远的阿贝尔2029星系群</span>\n\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t<div class=\"answerer_avatar\">\n\t\t\t\t\t\t\t{{if answer.answerUser.portrait && answer.answerUser.portrait !=''}}\n\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1aW0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerUser.id}}\"><img src=\"{{FE_lgsbase}}/{{answer.answerUser.portrait}}\" width=\"44\" height=\"44\" alt=\"{{answer.answerUser.userName}}\" /></a>\n\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1aW0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerUser.id}}\"><img src=\"//www.lgstatic.com/lg-community-fed/community/modules/common/img/avatar_default_7225407.png\" width=\"44\" height=\"44\" alt=\"{{answer.answerUser.userName}}\" /></a>\n\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<strong class=\"answerer_name user_card_float_wrap\">\n\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1aX0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerUser.id}}\">{{answer.answerUser.userName}}</a>\n\t\t\t\t\t\t\t<span style=\"display: none;\">{{userinfoFloat = answer.answerUser}}</span>\n\t\t\t\t\t\t\t<!--\n    问答社区-浮动用户卡片 arttemplate模板\n-->\n\n<div class=\"user_card_float\">\n    <div class=\"user_card_float_box\">\n        <div class=\"avatar fl\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.portrait && userinfoFloat.portrait != ''}}\n                <img src=\"{{FE_lgsbase}}/{{userinfoFloat.portrait}}\" width=\"54\" height=\"54\" />\n                {{else}}\n                <img src=\"../img/avatar_default.png\" width=\"54\" height=\"54\" />\n                {{/if}}\n            </a>\n        </div>\n        <div class=\"userinfo_base\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.userName.length > 15}}\n                <span>{{userinfoFloat.userName.substring(0,14)}}...</span>\n                {{else}}\n                <span>{{userinfoFloat.userName}}</span>\n                {{/if}}\n                {{if userinfoFloat.sex == 'MALE'}}\n                <i class=\"boy\">男</i>\n                {{else if userinfoFloat.sex == 'FEMALE'}}\n                <i class=\"girl\">女</i>\n                {{/if}}\n            </a>\n        </div>\n        {{if userinfoFloat.id == curUserid}}\n        <!-- <a class=\"userinfo_edit\" href=\"javascript:;\">编辑</a> -->\n        {{/if}}\n        <p class=\"userinfo_job\" title=\"{{userinfoFloat.positionName}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.positionName}}</a></p>\n        <p class=\"userinfo_intro\" title=\"{{userinfoFloat.introduce}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.introduce}}</a></p>\n        <div class=\"user_status\">\n            <ul class=\"clearfix\">\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=QUESTION\" target=\"_blank\"><em>{{userinfoFloat.questionNum}}</em>提问</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.answerNum}}</em>回答</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.gainStarNum}}</em>获赞</a></li>\n            </ul>\n        </div>\n        {{if userinfoFloat.isFollow && userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn btn_cancel\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\">已关注</a>\n        {{else if userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\"><i>加</i>关注</a>\n        {{/if}}\n        <span class=\"deck_out\"></span>\n        <span class=\"deck_in\"></span>\n    </div>\n</div>\n\n\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t<span class=\"answerer_position\">{{answer.answerUser.positionName}}</span>\n\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t回答了\n\t\t\t\t\t\t<span class=\"item_time fr\">{{answer.time}}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<h4 class=\"item_question question_name\" data-question-id=\"{{item.news.questionId}}\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\" data-lg-tj-id=\"1e10\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\">{{item.news.questionTitle}}</a></h4>\n\t\t\t\t\t<div class=\"item_content clearfix\">\n\t\t\t\t\t\t<div class=\"support_bar\">\n\t\t\t\t\t\t\t<a class=\"{{if answer.isStar}} has_support {{/if}}\" href=\"javascript:;\" data-answer-id=\"{{answer.answerId}}\" data-lg-tj-id=\"1e20\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">\n\t\t\t\t\t\t\t\t<i class=\"support_btn icon-glyph-like\"></i>\n\t\t\t\t\t\t\t\t<strong class=\"support_num\">{{answer.starNum}}</strong>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{{if answer.thumbnail && answer.thumbnail != ''}}\n\t\t\t\t\t\t<a class=\"answer_thumbnail_box fl\" href=\"javascript:;\" data-lg-tj-id=\"1e30\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\"><img class=\"answer_thumbnail\" src=\"{{answer.thumbnail.replace(/^https?\\:\\/\\/www\\.lagou\\.com/i, FE_lgsbase)}}\" /></a>\n\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t<p class=\"answer_summary\" data-lg-tj-id=\"1e40\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">\n\t\t\t\t\t\t\t{{answer.summary}}\n\t\t\t\t\t\t\t<a class=\"expand_answer\" href=\"javascript:;\" data-lg-tj-id=\"1e50\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">展开<i class=\"icon_expand\"></i></a>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<textarea class=\"answer_html\">{{#answer.answerContent}}</textarea>\n\t\t\t\t\t\t<div class=\"answer_full\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"item_status status_bar\">\n\t\t\t\t\t\t\t<span class=\"status_item\"><a href=\"{{FE_zbase}}/answer/{{answer.answerId}}.html\" target=\"_blank\" data-lg-tj-id=\"1e60\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\"><em class=\"comment_num highlight\">{{answer.commentNum}}</em>条评论</a></span>\n\t\t\t\t\t\t\t<!-- <span class=\"status_item\">来自<em class=\"from\">{{if item.news.source == 'PC'}} lagou.com {{else if item.news.source == 'APP'}} 拉勾APP {{else}} lagou.com {{/if}}</em></span> -->\n\t\t\t\t\t\t\t{{if answer.starUserList && answer.starUserList.length > 0}}\n\t\t\t\t\t\t\t<span class=\"status_item\">{{each answer.starUserList as supportUser supportUserIndex}}<a href=\"{{FE_zbase}}/user/userIndex-{{supportUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1e70\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{supportUser.id}}\">{{supportUser.userName}}</a>{{if supportUserIndex + 1 < answer.starUserList.length}}、{{/if}}{{/each}}{{if answer.starTrueNum > 3}}等<a class=\"support_list_btn\" href=\"javascript:;\" data-answer-id=\"{{answer.answerId}}\" data-lg-tj-id=\"1e80\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\"><em class=\"support_num highlight\">{{answer.starNum}}</em>人赞过</a>{{else}}赞过{{/if}}</span>\n\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t<span class=\"status_item\"><a class=\"share_popup_btn\" href=\"javascript:;\" data-share-url=\"{{FE_zbase}}/share/answer_{{answer.answerId}}.html\" data-lg-tj-id=\"1EI0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">分享</a></span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t\t{{/each}}\n\t\t{{else if item.type == 'ANSWER_HOT'}}\n\t\t\t{{each item.news.answerInfoList as answer answerIndex}}\n\t\t\t<li class=\"list_more\">\n\t\t\t\t<div class=\"news_answer hot_answer item\">\n\t\t\t\t\t<div class=\"item_header\">\n\t\t\t\t\t\t{{if answer.anonymous}}\n\t\t\t\t\t\t<div class=\"answerer_avatar\">\n\t\t\t\t\t\t\t<a class=\"anonymous\" href=\"javascript:;\"><img src=\"//www.lgstatic.com/lg-community-fed/community/modules/common/img/avatar_default_7225407.png\" width=\"44\" height=\"44\" alt=\"匿名用户\" /></a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<strong class=\"answerer_name user_card_float_wrap\">\n\t\t\t\t\t\t\t<a class=\"anonymous\" href=\"javascript:;\">匿名用户</a>\n\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t<span class=\"answerer_position\">可能来自遥远的阿贝尔2029星系群</span>\n\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t<div class=\"answerer_avatar\">\n\t\t\t\t\t\t\t{{if answer.answerUser.portrait && answer.answerUser.portrait !=''}}\n\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1ea0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerUser.id}}\"><img src=\"{{FE_lgsbase}}/{{answer.answerUser.portrait}}\" width=\"44\" height=\"44\" alt=\"{{answer.answerUser.userName}}\" /></a>\n\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1ea0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerUser.id}}\"><img src=\"//www.lgstatic.com/lg-community-fed/community/modules/common/img/avatar_default_7225407.png\" width=\"44\" height=\"44\" alt=\"{{answer.answerUser.userName}}\" /></a>\n\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<strong class=\"answerer_name user_card_float_wrap\">\n\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1eb0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerUser.id}}\">{{answer.answerUser.userName}}</a>\n\t\t\t\t\t\t\t<span style=\"display: none;\">{{userinfoFloat = answer.answerUser}}</span>\n\t\t\t\t\t\t\t<!--\n    问答社区-浮动用户卡片 arttemplate模板\n-->\n\n<div class=\"user_card_float\">\n    <div class=\"user_card_float_box\">\n        <div class=\"avatar fl\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.portrait && userinfoFloat.portrait != ''}}\n                <img src=\"{{FE_lgsbase}}/{{userinfoFloat.portrait}}\" width=\"54\" height=\"54\" />\n                {{else}}\n                <img src=\"../img/avatar_default.png\" width=\"54\" height=\"54\" />\n                {{/if}}\n            </a>\n        </div>\n        <div class=\"userinfo_base\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.userName.length > 15}}\n                <span>{{userinfoFloat.userName.substring(0,14)}}...</span>\n                {{else}}\n                <span>{{userinfoFloat.userName}}</span>\n                {{/if}}\n                {{if userinfoFloat.sex == 'MALE'}}\n                <i class=\"boy\">男</i>\n                {{else if userinfoFloat.sex == 'FEMALE'}}\n                <i class=\"girl\">女</i>\n                {{/if}}\n            </a>\n        </div>\n        {{if userinfoFloat.id == curUserid}}\n        <!-- <a class=\"userinfo_edit\" href=\"javascript:;\">编辑</a> -->\n        {{/if}}\n        <p class=\"userinfo_job\" title=\"{{userinfoFloat.positionName}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.positionName}}</a></p>\n        <p class=\"userinfo_intro\" title=\"{{userinfoFloat.introduce}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.introduce}}</a></p>\n        <div class=\"user_status\">\n            <ul class=\"clearfix\">\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=QUESTION\" target=\"_blank\"><em>{{userinfoFloat.questionNum}}</em>提问</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.answerNum}}</em>回答</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.gainStarNum}}</em>获赞</a></li>\n            </ul>\n        </div>\n        {{if userinfoFloat.isFollow && userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn btn_cancel\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\">已关注</a>\n        {{else if userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\"><i>加</i>关注</a>\n        {{/if}}\n        <span class=\"deck_out\"></span>\n        <span class=\"deck_in\"></span>\n    </div>\n</div>\n\n\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t<span class=\"answerer_position\">{{answer.answerUser.positionName}}</span>\n\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t的精选回答\n\t\t\t\t\t\t<span class=\"item_time fr\">{{answer.time}}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<h4 class=\"item_question question_name\" data-question-id=\"{{item.news.questionId}}\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\" data-lg-tj-id=\"1ec0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\">{{item.news.questionTitle}}</a></h4>\n\t\t\t\t\t<div class=\"item_content clearfix\">\n\t\t\t\t\t\t<div class=\"support_bar\">\n\t\t\t\t\t\t\t<a class=\"{{if answer.isStar}} has_support {{/if}}\" href=\"javascript:;\" data-answer-id=\"{{answer.answerId}}\" data-lg-tj-id=\"1ed0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">\n\t\t\t\t\t\t\t\t<i class=\"support_btn icon-glyph-like\"></i>\n\t\t\t\t\t\t\t\t<strong class=\"support_num\">{{answer.starNum}}</strong>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{{if answer.thumbnail && answer.thumbnail != ''}}\n\t\t\t\t\t\t<a class=\"answer_thumbnail_box fl\" href=\"javascript:;\" data-lg-tj-id=\"1ee0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\"><img class=\"answer_thumbnail\" src=\"{{answer.thumbnail.replace(/^https?\\:\\/\\/www\\.lagou\\.com/i, FE_lgsbase)}}\" /></a>\n\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t<p class=\"answer_summary\" data-lg-tj-id=\"1ef0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">\n\t\t\t\t\t\t\t{{answer.summary}}\n\t\t\t\t\t\t\t<a class=\"expand_answer\" href=\"javascript:;\" data-lg-tj-id=\"1eg0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">展开<i class=\"icon_expand\"></i></a>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<textarea class=\"answer_html\">{{#answer.answerContent}}</textarea>\n\t\t\t\t\t\t<div class=\"answer_full\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"item_status status_bar\">\n\t\t\t\t\t\t\t<span class=\"status_item\"><a href=\"{{FE_zbase}}/answer/{{answer.answerId}}.html\" target=\"_blank\" data-lg-tj-id=\"1eh0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\"><em class=\"comment_num highlight\">{{answer.commentNum}}</em>条评论</a></span>\n\t\t\t\t\t\t\t<!-- <span class=\"status_item\">来自<em class=\"from\">{{if item.news.source == 'PC'}} lagou.com {{else if item.news.source == 'APP'}} 拉勾APP {{else}} lagou.com {{/if}}</em></span> -->\n\t\t\t\t\t\t\t{{if answer.starUserList && answer.starUserList.length > 0}}\n\t\t\t\t\t\t\t<span class=\"status_item\">{{each answer.starUserList as supportUser supportUserIndex}}<a href=\"{{FE_zbase}}/user/userIndex-{{supportUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1ei0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{supportUser.id}}\">{{supportUser.userName}}</a>{{if supportUserIndex + 1 < answer.starUserList.length}}、{{/if}}{{/each}}{{if answer.starTrueNum > 3}}等<a class=\"support_list_btn\" href=\"javascript:;\" data-answer-id=\"{{answer.answerId}}\" data-lg-tj-id=\"1ej0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\"><em class=\"support_num highlight\">{{answer.starNum}}</em>人赞过</a>{{else}}赞过{{/if}}</span>\n\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t<span class=\"status_item\"><a class=\"share_popup_btn\" href=\"javascript:;\" data-share-url=\"{{FE_zbase}}/share/answer_{{answer.answerId}}.html\" data-lg-tj-id=\"1EJ0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">分享</a></span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t\t{{/each}}\n\t\t{{else if item.type == 'STAR_ANSWER'}}\n\t\t\t{{each item.news.answerInfoList as answer answerIndex}}\n\t\t\t<li class=\"list_more\">\n\t\t\t\t<div class=\"news_answer following_user_support_answer item\">\n\t\t\t\t\t<div class=\"item_header\">\n\t\t\t\t\t\t<!-- \n\t\t\t\t\t\t{{if answer.anonymous}}\n\t\t\t\t\t\t<div class=\"answerer_avatar\">\n\t\t\t\t\t\t\t<a class=\"anonymous\" href=\"javascript:;\"><img src=\"../../../common/img/avatar_default.png\" width=\"44\" height=\"44\" alt=\"匿名用户\" /></a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t<div class=\"answerer_avatar\">\n\t\t\t\t\t\t\t{{if answer.answerUser.portrait && answer.answerUser.portrait !=''}}\n\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\"><img src=\"{{FE_lgsbase}}/{{answer.answerUser.portrait}}\" width=\"44\" height=\"44\" alt=\"{{answer.answerUser.userName}}\" /></a>\n\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\"><img src=\"../../../common/img/avatar_default.png\" width=\"44\" height=\"44\" alt=\"{{answer.answerUser.userName}}\" /></a>\n\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t-->\n\t\t\t\t\t\t<div class=\"supporter_avatar\">\n\t\t\t\t\t\t\t{{if answer.followUserStarList[0].portrait && answer.followUserStarList[0].portrait !=''}}\n\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.followUserStarList[0].id}}.html\" target=\"_blank\"><img src=\"{{FE_lgsbase}}/{{answer.followUserStarList[0].portrait}}\" width=\"44\" height=\"44\" alt=\"{{answer.followUserStarList[0].userName}}\" /></a>\n\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.followUserStarList[0].id}}.html\" target=\"_blank\"><img src=\"//www.lgstatic.com/lg-community-fed/community/modules/common/img/avatar_default_7225407.png\" width=\"44\" height=\"44\" alt=\"{{answer.followUserStarList[0].userName}}\" /></a>\n\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{{each answer.followUserStarList as supporter supporterIndex}}\n\t\t\t\t\t\t<strong class=\"supporter_name user_card_float_wrap\">\n\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{supporter.id}}.html\" target=\"_blank\">{{supporter.userName}}</a>\n\t\t\t\t\t\t\t<span style=\"display: none;\">{{userinfoFloat = supporter}}</span>\n\t\t\t\t\t\t\t<!--\n    问答社区-浮动用户卡片 arttemplate模板\n-->\n\n<div class=\"user_card_float\">\n    <div class=\"user_card_float_box\">\n        <div class=\"avatar fl\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.portrait && userinfoFloat.portrait != ''}}\n                <img src=\"{{FE_lgsbase}}/{{userinfoFloat.portrait}}\" width=\"54\" height=\"54\" />\n                {{else}}\n                <img src=\"../img/avatar_default.png\" width=\"54\" height=\"54\" />\n                {{/if}}\n            </a>\n        </div>\n        <div class=\"userinfo_base\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.userName.length > 15}}\n                <span>{{userinfoFloat.userName.substring(0,14)}}...</span>\n                {{else}}\n                <span>{{userinfoFloat.userName}}</span>\n                {{/if}}\n                {{if userinfoFloat.sex == 'MALE'}}\n                <i class=\"boy\">男</i>\n                {{else if userinfoFloat.sex == 'FEMALE'}}\n                <i class=\"girl\">女</i>\n                {{/if}}\n            </a>\n        </div>\n        {{if userinfoFloat.id == curUserid}}\n        <!-- <a class=\"userinfo_edit\" href=\"javascript:;\">编辑</a> -->\n        {{/if}}\n        <p class=\"userinfo_job\" title=\"{{userinfoFloat.positionName}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.positionName}}</a></p>\n        <p class=\"userinfo_intro\" title=\"{{userinfoFloat.introduce}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.introduce}}</a></p>\n        <div class=\"user_status\">\n            <ul class=\"clearfix\">\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=QUESTION\" target=\"_blank\"><em>{{userinfoFloat.questionNum}}</em>提问</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.answerNum}}</em>回答</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.gainStarNum}}</em>获赞</a></li>\n            </ul>\n        </div>\n        {{if userinfoFloat.isFollow && userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn btn_cancel\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\">已关注</a>\n        {{else if userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\"><i>加</i>关注</a>\n        {{/if}}\n        <span class=\"deck_out\"></span>\n        <span class=\"deck_in\"></span>\n    </div>\n</div>\n\n\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t{{/each}}\n\t\t\t\t\t\t赞了\n\t\t\t\t\t\t<span class=\"item_time fr\" data-answer-time=\"{{answer.time}}\">{{item.news.time}}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<h4 class=\"item_question question_name\" data-question-id=\"{{item.news.questionId}}\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\">{{item.news.questionTitle}}</a></h4>\n\t\t\t\t\t<div class=\"item_content clearfix\">\n\t\t\t\t\t\t<div class=\"support_bar\">\n\t\t\t\t\t\t\t<a class=\"{{if answer.isStar}} has_support {{/if}}\" href=\"javascript:;\" data-answer-id=\"{{answer.answerId}}\">\n\t\t\t\t\t\t\t\t<i class=\"support_btn icon-glyph-like\"></i>\n\t\t\t\t\t\t\t\t<strong class=\"support_num\">{{answer.starNum}}</strong>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"answerer_info\">\n\t\t\t\t\t\t\t{{if answer.anonymous}}\n\t\t\t\t\t\t\t<strong class=\"answerer_name\">\n\t\t\t\t\t\t\t\t<a class=\"anonymous\" href=\"javascript:;\">匿名用户</a>\n\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t<span class=\"answerer_position\">可能来自遥远的阿贝尔2029星系群</span>\n\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t<strong class=\"answerer_name user_card_float_wrap\">\n\t\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\">{{answer.answerUser.userName}}</a>\n\t\t\t\t\t\t\t\t<span style=\"display: none;\">{{userinfoFloat = answer.answerUser}}</span>\n\t\t\t\t\t\t\t\t<!--\n    问答社区-浮动用户卡片 arttemplate模板\n-->\n\n<div class=\"user_card_float\">\n    <div class=\"user_card_float_box\">\n        <div class=\"avatar fl\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.portrait && userinfoFloat.portrait != ''}}\n                <img src=\"{{FE_lgsbase}}/{{userinfoFloat.portrait}}\" width=\"54\" height=\"54\" />\n                {{else}}\n                <img src=\"../img/avatar_default.png\" width=\"54\" height=\"54\" />\n                {{/if}}\n            </a>\n        </div>\n        <div class=\"userinfo_base\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.userName.length > 15}}\n                <span>{{userinfoFloat.userName.substring(0,14)}}...</span>\n                {{else}}\n                <span>{{userinfoFloat.userName}}</span>\n                {{/if}}\n                {{if userinfoFloat.sex == 'MALE'}}\n                <i class=\"boy\">男</i>\n                {{else if userinfoFloat.sex == 'FEMALE'}}\n                <i class=\"girl\">女</i>\n                {{/if}}\n            </a>\n        </div>\n        {{if userinfoFloat.id == curUserid}}\n        <!-- <a class=\"userinfo_edit\" href=\"javascript:;\">编辑</a> -->\n        {{/if}}\n        <p class=\"userinfo_job\" title=\"{{userinfoFloat.positionName}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.positionName}}</a></p>\n        <p class=\"userinfo_intro\" title=\"{{userinfoFloat.introduce}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.introduce}}</a></p>\n        <div class=\"user_status\">\n            <ul class=\"clearfix\">\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=QUESTION\" target=\"_blank\"><em>{{userinfoFloat.questionNum}}</em>提问</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.answerNum}}</em>回答</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.gainStarNum}}</em>获赞</a></li>\n            </ul>\n        </div>\n        {{if userinfoFloat.isFollow && userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn btn_cancel\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\">已关注</a>\n        {{else if userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\"><i>加</i>关注</a>\n        {{/if}}\n        <span class=\"deck_out\"></span>\n        <span class=\"deck_in\"></span>\n    </div>\n</div>\n\n\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t<span class=\"answerer_position\">{{answer.answerUser.positionName}}</span>\n\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{{if answer.thumbnail && answer.thumbnail != ''}}\n\t\t\t\t\t\t<a class=\"answer_thumbnail_box fl\" href=\"javascript:;\"><img class=\"answer_thumbnail\" src=\"{{answer.thumbnail.replace(/^https?\\:\\/\\/www\\.lagou\\.com/i, FE_lgsbase)}}\" /></a>\n\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t<p class=\"answer_summary\">\n\t\t\t\t\t\t\t{{answer.summary}}\n\t\t\t\t\t\t\t<a class=\"expand_answer\" href=\"javascript:;\">展开<i class=\"icon_expand\"></i></a>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<textarea class=\"answer_html\">{{#answer.answerContent}}</textarea>\n\t\t\t\t\t\t<div class=\"answer_full\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"item_status status_bar\">\n\t\t\t\t\t\t\t<span class=\"status_item\"><a href=\"{{FE_zbase}}/answer/{{answer.answerId}}.html\" target=\"_blank\"><em class=\"comment_num highlight\">{{answer.commentNum}}</em>条评论</a></span>\n\t\t\t\t\t\t\t<!-- <span class=\"status_item\">来自<em class=\"from\">{{if item.news.source == 'PC'}} lagou.com {{else if item.news.source == 'APP'}} 拉勾APP {{else}} lagou.com {{/if}}</em></span> -->\n\t\t\t\t\t\t\t{{if answer.starUserList && answer.starUserList.length > 0}}\n\t\t\t\t\t\t\t<span class=\"status_item\">{{each answer.starUserList as supportUser supportUserIndex}}<a href=\"{{FE_zbase}}/user/userIndex-{{supportUser.id}}.html\" target=\"_blank\">{{supportUser.userName}}</a>{{if supportUserIndex + 1 < answer.starUserList.length}}、{{/if}}{{/each}}{{if answer.starTrueNum > 3}}等<a class=\"support_list_btn\" href=\"javascript:;\" data-answer-id=\"{{answer.answerId}}\"><em class=\"support_num highlight\">{{answer.starNum}}</em>人赞过</a>{{else}}赞过{{/if}}</span>\n\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t<span class=\"status_item\"><a class=\"share_popup_btn\" href=\"javascript:;\" data-share-url=\"{{FE_zbase}}/share/answer_{{answer.answerId}}.html\">分享</a></span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t\t{{/each}}\n\t\t{{else if item.type == 'QUESTION_HOT' && item.news.answerInfoList.length > 1}}\n\t\t<li class=\"list_more\">\n\t\t\t<div class=\"news_answer_list item clearfix\">\n\t\t\t\t<!-- <h4 class=\"item_question question_name\" data-question-id=\"{{item.news.questionId}}\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\">{{item.news.questionTitle}}</a></h4> -->\n\t\t\t\t<ul class=\"list\">\n\t\t\t\t\t{{each item.news.answerInfoList as answer answerIndex}}\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<div class=\"news_answer item\">\n\t\t\t\t\t\t\t<div class=\"item_header\">\n\t\t\t\t\t\t\t\t{{if answer.anonymous}}\n\t\t\t\t\t\t\t\t<div class=\"answerer_avatar\">\n\t\t\t\t\t\t\t\t\t<a class=\"anonymous\" href=\"javascript:;\"><img src=\"//www.lgstatic.com/lg-community-fed/community/modules/common/img/avatar_default_7225407.png\" width=\"44\" height=\"44\" alt=\"匿名用户\" /></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<strong class=\"answerer_name\">\n\t\t\t\t\t\t\t\t\t<a class=\"anonymous\" href=\"javascript:;\">匿名用户</a>\n\t\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t\t<span class=\"answerer_position\">可能来自遥远的阿贝尔2029星系群</span>\n\t\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t\t<div class=\"answerer_avatar\">\n\t\t\t\t\t\t\t\t\t{{if answer.answerUser.portrait && answer.answerUser.portrait !=''}}\n\t\t\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1em0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerUser.id}}\"><img src=\"{{FE_lgsbase}}/{{answer.answerUser.portrait}}\" width=\"44\" height=\"44\" alt=\"{{answer.answerUser.userName}}\" /></a>\n\t\t\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1em0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerUser.id}}\"><img src=\"//www.lgstatic.com/lg-community-fed/community/modules/common/img/avatar_default_7225407.png\" width=\"44\" height=\"44\" alt=\"{{answer.answerUser.userName}}\" /></a>\n\t\t\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<strong class=\"answerer_name user_card_float_wrap\">\n\t\t\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1eo0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerUser.id}}\">{{answer.answerUser.userName}}</a>\n\t\t\t\t\t\t\t\t\t<span style=\"display: none;\">{{userinfoFloat = answer.answerUser}}</span>\n\t\t\t\t\t\t\t\t\t<!--\n    问答社区-浮动用户卡片 arttemplate模板\n-->\n\n<div class=\"user_card_float\">\n    <div class=\"user_card_float_box\">\n        <div class=\"avatar fl\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.portrait && userinfoFloat.portrait != ''}}\n                <img src=\"{{FE_lgsbase}}/{{userinfoFloat.portrait}}\" width=\"54\" height=\"54\" />\n                {{else}}\n                <img src=\"../img/avatar_default.png\" width=\"54\" height=\"54\" />\n                {{/if}}\n            </a>\n        </div>\n        <div class=\"userinfo_base\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.userName.length > 15}}\n                <span>{{userinfoFloat.userName.substring(0,14)}}...</span>\n                {{else}}\n                <span>{{userinfoFloat.userName}}</span>\n                {{/if}}\n                {{if userinfoFloat.sex == 'MALE'}}\n                <i class=\"boy\">男</i>\n                {{else if userinfoFloat.sex == 'FEMALE'}}\n                <i class=\"girl\">女</i>\n                {{/if}}\n            </a>\n        </div>\n        {{if userinfoFloat.id == curUserid}}\n        <!-- <a class=\"userinfo_edit\" href=\"javascript:;\">编辑</a> -->\n        {{/if}}\n        <p class=\"userinfo_job\" title=\"{{userinfoFloat.positionName}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.positionName}}</a></p>\n        <p class=\"userinfo_intro\" title=\"{{userinfoFloat.introduce}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.introduce}}</a></p>\n        <div class=\"user_status\">\n            <ul class=\"clearfix\">\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=QUESTION\" target=\"_blank\"><em>{{userinfoFloat.questionNum}}</em>提问</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.answerNum}}</em>回答</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.gainStarNum}}</em>获赞</a></li>\n            </ul>\n        </div>\n        {{if userinfoFloat.isFollow && userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn btn_cancel\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\">已关注</a>\n        {{else if userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\"><i>加</i>关注</a>\n        {{/if}}\n        <span class=\"deck_out\"></span>\n        <span class=\"deck_in\"></span>\n    </div>\n</div>\n\n\t\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t\t<span class=\"answerer_position\">{{answer.answerUser.positionName}}</span>\n\t\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t\t回答了\n\t\t\t\t\t\t\t\t<span class=\"item_time fr\">{{answer.time}}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<h4 class=\"item_question question_name\" data-question-id=\"{{item.news.questionId}}\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\" data-lg-tj-id=\"1ep0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\">{{item.news.questionTitle}}</a></h4>\n\t\t\t\t\t\t\t<div class=\"item_content clearfix\">\n\t\t\t\t\t\t\t\t<div class=\"support_bar\">\n\t\t\t\t\t\t\t\t\t<a class=\"{{if answer.isStar}} has_support {{/if}}\" href=\"javascript:;\" data-answer-id=\"{{answer.answerId}}\" data-lg-tj-id=\"1eq0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">\n\t\t\t\t\t\t\t\t\t\t<i class=\"support_btn icon-glyph-like\"></i>\n\t\t\t\t\t\t\t\t\t\t<strong class=\"support_num\">{{answer.starNum}}</strong>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{{if answer.thumbnail && answer.thumbnail != ''}}\n\t\t\t\t\t\t\t\t<a class=\"answer_thumbnail_box fl\" href=\"javascript:;\" data-lg-tj-id=\"1er0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\"><img class=\"answer_thumbnail\" src=\"{{answer.thumbnail.replace(/^https?\\:\\/\\/www\\.lagou\\.com/i, FE_lgsbase)}}\" /></a>\n\t\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t\t<p class=\"answer_summary\" data-lg-tj-id=\"1es0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">\n\t\t\t\t\t\t\t\t\t{{answer.summary}}\n\t\t\t\t\t\t\t\t\t<a class=\"expand_answer\" href=\"javascript:;\" data-lg-tj-id=\"1et0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">展开<i class=\"icon_expand\"></i></a>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<textarea class=\"answer_html\">{{#answer.answerContent}}</textarea>\n\t\t\t\t\t\t\t\t<div class=\"answer_full\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"item_status status_bar\">\n\t\t\t\t\t\t\t\t\t<span class=\"status_item\"><a href=\"{{FE_zbase}}/answer/{{answer.answerId}}.html\" target=\"_blank\"><em class=\"comment_num highlight\" data-lg-tj-id=\"1eu0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">{{answer.commentNum}}</em>条评论</a></span>\n\t\t\t\t\t\t\t\t\t<!-- <span class=\"status_item\">来自<em class=\"from\">{{if item.news.source == 'PC'}} lagou.com {{else if item.news.source == 'APP'}} 拉勾APP {{else}} lagou.com {{/if}}</em></span> -->\n\t\t\t\t\t\t\t\t\t{{if answer.starUserList && answer.starUserList.length > 0}}\n\t\t\t\t\t\t\t\t\t<span class=\"status_item\">{{each answer.starUserList as supportUser supportUserIndex}}<a href=\"{{FE_zbase}}/user/userIndex-{{supportUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1ev0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{supportUser.id}}\">{{supportUser.userName}}</a>{{if supportUserIndex + 1 < answer.starUserList.length}}、{{/if}}{{/each}}{{if answer.starTrueNum > 3}}等<a class=\"support_list_btn\" href=\"javascript:;\" data-answer-id=\"{{answer.answerId}}\" data-lg-tj-id=\"1ew0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\"><em class=\"support_num highlight\">{{answer.starNum}}</em>人赞过</a>{{else}}赞过{{/if}}</span>\n\t\t\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t\t\t<span class=\"status_item\"><a class=\"share_popup_btn\" href=\"javascript:;\" data-share-url=\"{{FE_zbase}}/share/answer_{{answer.answerId}}.html\" data-lg-tj-id=\"1EJ0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">分享</a></span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</li>\n\t\t\t\t\t{{/each}}\n\t\t\t\t</ul>\n\t\t\t\t<a class=\"more_answer fr\" href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\" data-lg-tj-id=\"1ex0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\">查看全部<span class=\"answer_num\">{{item.news.answerNum}}</span>个回答</a>\n\t\t\t</div>\n\t\t</li>\n\t\t{{else if item.type == 'QUESTION_HOT' && item.news.answerInfoList.length > 0}}\n\t\t\t{{each item.news.answerInfoList as answer answerIndex}}\n\t\t\t<li class=\"list_more\">\n\t\t\t\t<div class=\"news_answer item\">\n\t\t\t\t\t<div class=\"item_header\">\n\t\t\t\t\t\t{{if answer.anonymous}}\n\t\t\t\t\t\t<div class=\"answerer_avatar\">\n\t\t\t\t\t\t\t<a class=\"anonymous\" href=\"javascript:;\"><img src=\"//www.lgstatic.com/lg-community-fed/community/modules/common/img/avatar_default_7225407.png\" width=\"44\" height=\"44\" alt=\"匿名用户\" /></a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<strong class=\"answerer_name user_card_float_wrap\">\n\t\t\t\t\t\t\t<a class=\"anonymous\" href=\"javascript:;\">匿名用户</a>\n\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t可能来自遥远的阿贝尔2029星系群\n\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t<div class=\"answerer_avatar\">\n\t\t\t\t\t\t\t{{if answer.answerUser.portrait && answer.answerUser.portrait !=''}}\n\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1ey0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerUser.id}}\"><img src=\"{{FE_lgsbase}}/{{answer.answerUser.portrait}}\" width=\"44\" height=\"44\" alt=\"{{answer.answerUser.userName}}\" /></a>\n\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1ey0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerUser.id}}\"><img src=\"//www.lgstatic.com/lg-community-fed/community/modules/common/img/avatar_default_7225407.png\" width=\"44\" height=\"44\" alt=\"{{answer.answerUser.userName}}\" /></a>\n\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<strong class=\"answerer_name user_card_float_wrap\">\n\t\t\t\t\t\t\t<a href=\"{{FE_zbase}}/user/userIndex-{{answer.answerUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1ez0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerUser.id}}\">{{answer.answerUser.userName}}</a>\n\t\t\t\t\t\t\t<span style=\"display: none;\">{{userinfoFloat = answer.answerUser}}</span>\n\t\t\t\t\t\t\t<!--\n    问答社区-浮动用户卡片 arttemplate模板\n-->\n\n<div class=\"user_card_float\">\n    <div class=\"user_card_float_box\">\n        <div class=\"avatar fl\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.portrait && userinfoFloat.portrait != ''}}\n                <img src=\"{{FE_lgsbase}}/{{userinfoFloat.portrait}}\" width=\"54\" height=\"54\" />\n                {{else}}\n                <img src=\"../img/avatar_default.png\" width=\"54\" height=\"54\" />\n                {{/if}}\n            </a>\n        </div>\n        <div class=\"userinfo_base\">\n            <a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">\n                {{if userinfoFloat.userName.length > 15}}\n                <span>{{userinfoFloat.userName.substring(0,14)}}...</span>\n                {{else}}\n                <span>{{userinfoFloat.userName}}</span>\n                {{/if}}\n                {{if userinfoFloat.sex == 'MALE'}}\n                <i class=\"boy\">男</i>\n                {{else if userinfoFloat.sex == 'FEMALE'}}\n                <i class=\"girl\">女</i>\n                {{/if}}\n            </a>\n        </div>\n        {{if userinfoFloat.id == curUserid}}\n        <!-- <a class=\"userinfo_edit\" href=\"javascript:;\">编辑</a> -->\n        {{/if}}\n        <p class=\"userinfo_job\" title=\"{{userinfoFloat.positionName}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.positionName}}</a></p>\n        <p class=\"userinfo_intro\" title=\"{{userinfoFloat.introduce}}\"><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html\" target=\"_blank\">{{userinfoFloat.introduce}}</a></p>\n        <div class=\"user_status\">\n            <ul class=\"clearfix\">\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=QUESTION\" target=\"_blank\"><em>{{userinfoFloat.questionNum}}</em>提问</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.answerNum}}</em>回答</a></li>\n                <li><a href=\"{{FE_zbase}}/user/userIndex-{{userinfoFloat.id}}.html?newsType=ANSWER\" target=\"_blank\"><em>{{userinfoFloat.gainStarNum}}</em>获赞</a></li>\n            </ul>\n        </div>\n        {{if userinfoFloat.isFollow && userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn btn_cancel\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\">已关注</a>\n        {{else if userinfoFloat.id != curUserid}}\n        <a class=\"user_follow_btn btn\" href=\"javascript:;\" data-user-id=\"{{userinfoFloat.id}}\"><i>加</i>关注</a>\n        {{/if}}\n        <span class=\"deck_out\"></span>\n        <span class=\"deck_in\"></span>\n    </div>\n</div>\n\n\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t<span class=\"answerer_position\">{{answer.answerUser.positionName}}</span>\n\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t回答了\n\t\t\t\t\t\t<span class=\"item_time fr\">{{answer.time}}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<h4 class=\"item_question question_name\" data-question-id=\"{{item.news.questionId}}\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\" data-lg-tj-id=\"1eA0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\">{{item.news.questionTitle}}</a></h4>\n\t\t\t\t\t<div class=\"item_content clearfix\">\n\t\t\t\t\t\t<div class=\"support_bar\">\n\t\t\t\t\t\t\t<a class=\"{{if answer.isStar}} has_support {{/if}}\" href=\"javascript:;\" data-answer-id=\"{{answer.answerId}}\" data-lg-tj-id=\"1eB0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">\n\t\t\t\t\t\t\t\t<i class=\"support_btn icon-glyph-like\"></i>\n\t\t\t\t\t\t\t\t<strong class=\"support_num\">{{answer.starNum}}</strong>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{{if answer.thumbnail && answer.thumbnail != ''}}\n\t\t\t\t\t\t<a class=\"answer_thumbnail_box fl\" href=\"javascript:;\" data-lg-tj-id=\"1eC0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\"><img class=\"answer_thumbnail\" src=\"{{answer.thumbnail.replace(/^https?\\:\\/\\/www\\.lagou\\.com/i, FE_lgsbase)}}\" /></a>\n\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t<p class=\"answer_summary\" data-lg-tj-id=\"1eD0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">\n\t\t\t\t\t\t\t{{answer.summary}}\n\t\t\t\t\t\t\t<a class=\"expand_answer\" href=\"javascript:;\" data-lg-tj-id=\"1eE0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">展开<i class=\"icon_expand\"></i></a>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<textarea class=\"answer_html\">{{#answer.answerContent}}</textarea>\n\t\t\t\t\t\t<div class=\"answer_full\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"item_status status_bar\">\n\t\t\t\t\t\t\t<span class=\"status_item\"><a href=\"{{FE_zbase}}/answer/{{answer.answerId}}.html\" target=\"_blank\" data-lg-tj-id=\"1eF0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\"><em class=\"comment_num highlight\">{{answer.commentNum}}</em>条评论</a></span>\n\t\t\t\t\t\t\t<!-- <span class=\"status_item\">来自<em class=\"from\">{{if item.news.source == 'PC'}} lagou.com {{else if item.news.source == 'APP'}} 拉勾APP {{else}} lagou.com {{/if}}</em></span> -->\n\t\t\t\t\t\t\t{{if answer.starUserList && answer.starUserList.length > 0}}\n\t\t\t\t\t\t\t<span class=\"status_item\">{{each answer.starUserList as supportUser supportUserIndex}}<a href=\"{{FE_zbase}}/user/userIndex-{{supportUser.id}}.html\" target=\"_blank\" data-lg-tj-id=\"1eG0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{supportUser.id}}\">{{supportUser.userName}}</a>{{if supportUserIndex + 1 < answer.starUserList.length}}、{{/if}}{{/each}}{{if answer.starTrueNum > 3}}等<a class=\"support_list_btn\" href=\"javascript:;\" data-answer-id=\"{{answer.answerId}}\" data-lg-tj-id=\"1eH0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\"><em class=\"support_num highlight\">{{answer.starNum}}</em>人赞过</a>{{else}}赞过{{/if}}</span>\n\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t<span class=\"status_item\"><a class=\"share_popup_btn\" href=\"javascript:;\" data-share-url=\"{{FE_zbase}}/share/answer_{{answer.answerId}}.html\" data-lg-tj-id=\"1EK0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{answer.answerId}}\">分享</a></span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t\t{{/each}}\n\t\t{{else if item.type == 'QUESTION_HOT'}}\n\t\t<li class=\"list_more\">\n\t\t\t<div class=\"news_question item\">\n\t\t\t\t<div class=\"item_header\">\n\t\t\t\t\t{{each item.news.topicList as topic topicIndex}}\n\t\t\t\t\t<strong class=\"topic_name topic_name_style_1\" data-topic-id=\"{{topic.topicId}}\"><a href=\"{{FE_zbase}}/topic/{{topic.topicId}}.html\" target=\"_blank\" data-lg-tj-id=\"1eI0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{topic.topicId}}\">{{topic.topicTitle}}</a></strong>\n\t\t\t\t\t{{/each}}\n\t\t\t\t\t收到一个新的问题\n\t\t\t\t\t<span class=\"item_time fr\">{{item.news.time}}</span>\n\t\t\t\t</div>\n\t\t\t\t<h4 class=\"item_question question_name\" data-question-id=\"{{item.news.questionId}}\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\" data-lg-tj-id=\"1eJ0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\">{{item.news.questionTitle}}</a></h4>\n\t\t\t\t{{if item.news.questionContent}}\n\t\t\t\t<p class=\"item_question_desc\" data-question-id=\"{{item.news.questionId}}\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\">{{#item.news.questionContent}}</a></p>\n\t\t\t\t{{/if}}\n\t\t\t\t<div class=\"item_content clearfix\">\n\t\t\t\t\t<div class=\"item_status status_bar\">\n\t\t\t\t\t\t<span class=\"status_item\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\" data-lg-tj-id=\"1eK0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\"><em class=\"answer_num highlight\">{{item.news.answerNum}}</em>个回答</a></span>\n\t\t\t\t\t\t<span class=\"status_item\"><a href=\"{{FE_zbase}}/question/{{item.news.questionId}}.html\" target=\"_blank\" data-lg-tj-id=\"1eL0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\"><em class=\"follow_num highlight\">{{item.news.attentionNum}}</em>人关注</a></span>\n\t\t\t\t\t\t<!-- <span class=\"status_item\">来自<em class=\"from\">{{if item.news.source == 'PC'}} lagou.com {{else if item.news.source == 'APP'}} 拉勾APP {{else}} lagou.com {{/if}}</em></span> -->\n\t\t\t\t\t\t<span class=\"status_item\"><a class=\"share_popup_btn\" href=\"javascript:;\" data-share-url=\"{{FE_zbase}}/share/question_{{item.news.questionId}}.html\" data-lg-tj-id=\"1EL0\" data-lg-tj-no=\"{{pageNum < 10 ? '0' + pageNum : pageNum}}{{index + 1 < 10 ? '0' + (index + 1) : index + 1}}\" data-lg-tj-cid=\"{{item.news.questionId}}\">分享</a></span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</li>\n\t\t{{/if}}\n\t{{/each}}\n{{/if}}\n";
				var htmlStr = template.compile(tpl)({
					newsList: data.content.data.moreNewsList,
					curUserid: global.curUserid,
					pageNum: newsMoreSetting[targetNewsCategory].pageNum,
					FE_base: GLOBAL_DOMAIN.ctx,
					FE_zbase: GLOBAL_DOMAIN.zctx,
					FE_lgsbase: GLOBAL_DOMAIN.lgsctx,
					cdndomain: window.GLOBAL_CDN_DOMAIN
				});
				$targetNewsList.children('ul').append(htmlStr);
				$targetNewsList.find('.list_more .item_question, #newsMine .list_more .item_question_desc').dotdotdot();
				$targetNewsList.find('.list_more .answer_summary').dotdotdot({
					after: 'a.expand_answer',
					callback: function(isTruncated, orgContent) {
						if (isTruncated) {
							// $(orgContent.context).find('a.expand_answer').show();
						}
					}
				});
				$targetNewsList.find('.list_more').removeClass('list_more');
				// 处理空
				if ($targetNewsList.children('ul').find('li').size() < 1) {
					$targetNewsList.children('ul').append('<li class="none_item"><i></i>暂时没有推荐内容</li>');
				}
				if (!data.content.data.hasMore) {
					$targetNewsList.find('.news_loding').remove();
					$targetNewsList.find('.news_more').remove();
				}
				$(window).resize();
			} else {
				console.log(data.message);
			}
		}).fail(function() {
			console.log('getMoreNews error');
		}).always(function() {
			isLoadingNews = false;
			$targetNewsList.find('.news_loding').hide();
			$targetNewsList.find('.news_more').removeClass('btn_disable').show();
		});
	}

	// 滚动加载
	$(window).scroll(function() {
		if (isLoadingNews || $('#news .news_more:visible').size() < 1) {
			return;
		}
		var curHeight = $(window).scrollTop() + $(window).height();
		if (curHeight > $('#news .news_more:visible').offset().top) {
			$('#news .news_more:visible').click();
		}
	});

	// 答案-点赞的人弹窗
	require('community/modules/common/support-list-popup/main');

});

/*!community/modules/common/img-zoom-tool/main.js*/
;/**
 * 富文本图片展示控制组件
 * 
 * @author fridayhu@lagou.com
 *
 * @require "community/modules/common/img-zoom-tool/main.less"
 * 
 */

define('community/modules/common/img-zoom-tool/main', ['require', 'exports', 'module'], function(require, exports, module) {

	$('body').on('click', '.editor_parse img', function(event) {
		$(this).toggleClass('zoomed');
	});

});

/*!community/page/index/main.js*/
;/**
 * 问答社区-首页
 * 
 * @author fridayhu@lagou.com
 * 
 */

define('community/page/index/main', ['require', 'exports', 'module', 'community/modules/index/news/main', 'community/modules/common/img-zoom-tool/main'], function(require, exports, module) {

	// 最新动态
	require('community/modules/index/news/main');
	// 富文本图片缩放组件
	require('community/modules/common/img-zoom-tool/main');

});
